From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
"yebin (H)" <yebin10@huawei.com>, Ye Bin <yebin@huaweicloud.com>,
linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: fix BUG_ON in xfs_getbmap()
Date: Tue, 28 Mar 2023 13:58:09 +1100 [thread overview]
Message-ID: <20230328025809.GC3223426@dread.disaster.area> (raw)
In-Reply-To: <20230328020341.GH16180@frogsfrogsfrogs>
On Mon, Mar 27, 2023 at 07:03:41PM -0700, Darrick J. Wong wrote:
> On Mon, Mar 27, 2023 at 06:47:54PM -0700, Christoph Hellwig wrote:
> > On Mon, Mar 27, 2023 at 06:43:28PM -0700, Darrick J. Wong wrote:
> > > <shrug> Seeing as the data fork mappings can change the instant the
> > > ILOCK drops, I'm not /that/ worried about users seeing a delalloc
> > > mapping even if the user requested a flush. The results are already
> > > obsolete when they get to userspace, unless the application software has
> > > found another means to lock out access to the file.
> >
> > That is true, but then again the users asked to not see delalloc
> > mappings, so we really shouldn't report one, right?
>
> Yeah, I suppose so. I wonder how many programs there are out there that
> don't pass in BMV_IF_DELALLOC /and/ can't handle that? But I suppose
> taking MMAP_EXCL is good enough to shut up the obvious assertion vector.
Why not just skip it? Take the flush completion as being a
point-in-time snapshot where there are no delalloc extents, and if
any new ones have been created racily, just skip them as being
"after" the flush and so don't get reported...
> The COW implementation probably ought to be doing the flush too.
Yup, and then just skip any delalloc extents found after that, too.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2023-03-28 2:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 14:02 [PATCH] xfs: fix BUG_ON in xfs_getbmap() Ye Bin
2023-03-27 15:15 ` Darrick J. Wong
2023-03-28 1:33 ` yebin (H)
2023-03-28 1:43 ` Darrick J. Wong
2023-03-28 1:47 ` Christoph Hellwig
2023-03-28 2:03 ` Darrick J. Wong
2023-03-28 2:58 ` Dave Chinner [this message]
2023-03-28 1:44 ` Christoph Hellwig
2023-03-28 1:49 ` Christoph Hellwig
2023-03-27 17:30 ` kernel test robot
2023-03-27 20:14 ` kernel test robot
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=20230328025809.GC3223426@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=yebin10@huawei.com \
--cc=yebin@huaweicloud.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox