public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Hellwig <hch@infradead.org>, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
	linux-ext4@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, ntfs3@lists.linux.dev,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2 1/6] fs: enhance and rename shutdown() callback to remove_bdev()
Date: Tue, 1 Jul 2025 16:05:03 +0930	[thread overview]
Message-ID: <baec02a0-e2fb-4801-b2ad-f602fc4d1cfc@gmx.com> (raw)
In-Reply-To: <aGN8zsyYEArKr0DV@infradead.org>



在 2025/7/1 15:44, Christoph Hellwig 写道:
> On Tue, Jul 01, 2025 at 03:02:34PM +0930, Qu Wenruo wrote:
>> To allow those multi-device filesystems to be integrated to use
>> fs_holder_ops:
>>
>> - Rename shutdown() call back to remove_bdev()
>>    To better describe when the call back is called.
> 
> What is renamed back here?

Rename the old shutdown to remove_bdev().

> 
>> -static void exfat_shutdown(struct super_block *sb)
>> +static void exfat_shutdown(struct super_block *sb, struct block_device *bdev)
>>   {
>>   	exfat_force_shutdown(sb, EXFAT_GOING_DOWN_NOSYNC);
>>   }
>> @@ -202,7 +202,7 @@ static const struct super_operations exfat_sops = {
>>   	.put_super	= exfat_put_super,
>>   	.statfs		= exfat_statfs,
>>   	.show_options	= exfat_show_options,
>> -	.shutdown	= exfat_shutdown,
>> +	.remove_bdev	= exfat_shutdown,
> 
> Please also rename the function so that they match the method name.

I prefer not, and it is intentionally left as is.

This give us a very clear view what a fs is expected to do.

If a fs can only shutdown when losing any device, a read won't need to 
dig into the details, just looking at that line will tell us what is the 
behavior.

Thanks,
Qu


  reply	other threads:[~2025-07-01  6:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01  5:32 [PATCH v2 0/6] btrfs: add remove_bdev() callback Qu Wenruo
2025-07-01  5:32 ` [PATCH v2 1/6] fs: enhance and rename shutdown() callback to remove_bdev() Qu Wenruo
2025-07-01  5:54   ` Darrick J. Wong
2025-07-01  6:14   ` Christoph Hellwig
2025-07-01  6:35     ` Qu Wenruo [this message]
2025-07-01  6:40       ` Christoph Hellwig
2025-07-01  8:41       ` Christian Brauner
2025-07-01  8:46         ` Qu Wenruo
2025-07-01  7:52   ` Jan Kara
2025-07-01  5:32 ` [PATCH v2 2/6] btrfs: introduce a new fs state, EMERGENCY_SHUTDOWN Qu Wenruo
2025-07-01  5:32 ` [PATCH v2 3/6] btrfs: reject file operations if in shutdown state Qu Wenruo
2025-07-01  5:32 ` [PATCH v2 4/6] btrfs: reject delalloc ranges " Qu Wenruo
2025-07-01  5:32 ` [PATCH v2 5/6] btrfs: implement shutdown ioctl Qu Wenruo
2025-07-02  9:38   ` kernel test robot
2025-07-01  5:32 ` [PATCH v2 6/6] btrfs: implement remove_bdev super operation callback Qu Wenruo
2025-07-01  8:21   ` Anand Jain
2025-07-01  8:30     ` 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=baec02a0-e2fb-4801-b2ad-f602fc4d1cfc@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=brauner@kernel.org \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    --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