From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: yebin <yebin10@huawei.com>, jack@suse.com, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 0/2] Fix race between do_invalidatepage and init_page_buffers
Date: Thu, 19 Nov 2020 22:36:00 -0500 [thread overview]
Message-ID: <20201120033600.GA695373@mit.edu> (raw)
In-Reply-To: <20200825084137.GA32298@quack2.suse.cz>
On Tue, Aug 25, 2020 at 10:41:37AM +0200, Jan Kara wrote:
> On Tue 25-08-20 10:11:29, yebin wrote:
> > Your patch certainly can fix the problem with my testcases, but I don't
> > think it's a good way. There are other paths that can call
> > do_invalidatepage , for instance block ioctl to discard and zero_range.
>
> OK, good point! So my patch is a cleanup that stands on its own and we
> should do it regardless. But I agree we need more to completely fix this.
> I don't quite like the callback you've added just for this special case
> (furthermore it grows size of every buffer_head and there can be lots of
> those). But I agree with the general idea that we shouldn't discard buffers
> that the filesystem is working with.
>
> In fact I believe that fallocate(2) and zeroout/discard ioctls should
> return EBUSY if they are run against a mounted device because with 99%
> probability something went wrong and you're accidentally discarding the
> wrong device. But maybe I'm wrong. I'll run this idea through other fs
> developers.
I'm going through old patches, and I'm trying to figure out where did
we end up on this issue? Did we come to a conclusion on this?
One other thing which I noticed when looking at the original patch was
shouldn't lvreduce not be allowed to run on a LV which has a mounted
file system on its block device?
- Ted
next prev parent reply other threads:[~2020-11-20 3:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-22 8:22 [PATCH 0/2] Fix race between do_invalidatepage and init_page_buffers Ye Bin
2020-08-22 8:22 ` [PATCH 1/2] ext4: Add comment to BUFFER_FLAGS_DISCARD for search code Ye Bin
2020-08-22 8:22 ` [PATCH 2/2] jbd2: Fix race between do_invalidatepage and init_page_buffers Ye Bin
2020-08-24 15:51 ` [PATCH 0/2] " Jan Kara
2020-08-25 2:11 ` yebin
2020-08-25 8:41 ` Jan Kara
2020-11-20 3:36 ` Theodore Y. Ts'o [this message]
2020-11-23 16:54 ` Jan Kara
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=20201120033600.GA695373@mit.edu \
--to=tytso@mit.edu \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=yebin10@huawei.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