From: Christoph Hellwig <hch@lst.de>
To: Qu Wenruo <wqu@suse.com>
Cc: Christoph Hellwig <hch@lst.de>,
Christian Brauner <brauner@kernel.org>,
linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk, jack@suse.cz
Subject: Re: [PATCH 1/6] fs: add a new remove_bdev() super operations callback
Date: Thu, 26 Jun 2025 13:02:13 +0200 [thread overview]
Message-ID: <20250626110213.GA9693@lst.de> (raw)
In-Reply-To: <95a2ff19-0525-48ef-9949-c3e585e8ed1f@suse.com>
On Thu, Jun 26, 2025 at 08:06:03PM +0930, Qu Wenruo wrote:
>
> If I understand the @surprise parameter correctly, it should allow the fs
> to do read/write as usual if it's not a surprise removal.
>
> And btrfs will take the chance to fully writeback all the dirty pages (more
> than the default shutdown behavior which only writebacks the current
> transaction, no dirty data pages.).
That's already taken care of by the call to sync_filesystem in
fs_bdev_mark_dead.
> But in the real world, for test case like generic/730, the @surprise flag
> is either not properly respected, I'm getting @surprise == false but the
> block device is already gone.
It only works for drivers that call blk_mark_disk_dead or bdev_mark_dead
directly with the surprise flag.
> So I'm not sure what's the real expected behavior here, and the new flag is
> only for future expansion for now.
Let's not add just in case arguments.
next prev parent reply other threads:[~2025-06-26 11:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 23:53 [PATCH 0/6] btrfs: add remove_bdev() callback Qu Wenruo
2025-06-25 23:53 ` [PATCH 1/6] fs: add a new remove_bdev() super operations callback Qu Wenruo
2025-06-26 8:38 ` Christian Brauner
2025-06-26 8:44 ` Qu Wenruo
2025-06-26 9:10 ` Christian Brauner
2025-06-26 9:18 ` Qu Wenruo
2025-06-26 9:29 ` Christian Brauner
2025-06-26 10:14 ` Christoph Hellwig
2025-06-26 10:36 ` Qu Wenruo
2025-06-26 11:02 ` Christoph Hellwig [this message]
2025-07-01 11:35 ` Christian Brauner
2025-06-25 23:53 ` [PATCH 2/6] btrfs: introduce a new fs state, EMERGENCY_SHUTDOWN Qu Wenruo
2025-06-25 23:53 ` [PATCH 3/6] btrfs: reject file operations if in shutdown state Qu Wenruo
2025-06-25 23:53 ` [PATCH 4/6] btrfs: reject delalloc ranges if the fs is shutdown Qu Wenruo
2025-06-25 23:53 ` [PATCH 5/6] btrfs: implement shutdown ioctl Qu Wenruo
2025-06-25 23:53 ` [PATCH 6/6] btrfs: implement remove_bdev super operation callback Qu Wenruo
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=20250626110213.GA9693@lst.de \
--to=hch@lst.de \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wqu@suse.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;
as well as URLs for NNTP newsgroup(s).