From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Wengang Wang <wen.gang.wang@oracle.com>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: dont remain new blocks in cowfork for unshare
Date: Fri, 31 May 2024 09:13:05 -0700 [thread overview]
Message-ID: <Zln3EZgz7fVnJoAU@infradead.org> (raw)
In-Reply-To: <20240531160053.GQ52987@frogsfrogsfrogs>
On Fri, May 31, 2024 at 09:00:53AM -0700, Darrick J. Wong wrote:
> > Yes, The main purpose is for the later (avoid preallocating beyond).
>
> But the user set an extent size hint, so presumably they want us to (try
> to) obey that even for unshare operations, right?
>
> > The patch also makes unshare use delayed allocation for bigger extent.
>
> If there's a good reason for not trying, can we avoid the iflag by
> detecting IOMAP_UNSHARE in the @flags parameter to
> xfs_buffered_write_iomap_begin and thereby use delalloc if there isn't
> an extent size hint set?
.. or (even if this is scope creep) just make delalloc work for
extent size hints. Now that we create all extents as unwritten there
is no fundamental reason for that to be dangerous, it'll just need
a little more work.
> (IOWs I don't really like that an upper layer of the fs sets a flag for
> a lower layer to catch based on the context of whatever operation it's
> doing, and in the meantime another thread could observe that state and
> make different decisions.)
Yes, that's pretty much a no-go.
next prev parent reply other threads:[~2024-05-31 16:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 21:26 [PATCH] xfs: dont remain new blocks in cowfork for unshare Wengang Wang
2024-05-20 18:08 ` Darrick J. Wong
2024-05-20 22:42 ` Wengang Wang
2024-05-31 15:46 ` Wengang Wang
2024-05-31 16:00 ` Darrick J. Wong
2024-05-31 16:13 ` Christoph Hellwig [this message]
2024-05-31 17:53 ` Wengang Wang
2024-06-06 18:16 ` Wengang Wang
2024-06-11 17:00 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zln3EZgz7fVnJoAU@infradead.org \
--to=hch@infradead.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=wen.gang.wang@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.