Re: [PATCH RFC 5/6] fs: introduce a shutdown_bdev super block operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 20, 2025 at 05:36:52PM +0200, Jan Kara wrote:
> On Fri 20-06-25 15:17:28, Qu Wenruo wrote:
> > Currently we already have the super_operations::shutdown() callback,
> > which is called when the block device of a filesystem is marked dead.
> > 
> > However this is mostly for single(ish) block device filesystems.
> > 
> > For multi-device filesystems, they may afford a missing device, thus may
> > continue work without fully shutdown the filesystem.
> > 
> > So add a new super_operation::shutdown_bdev() callback, for mutli-device
> > filesystems like btrfs and bcachefs.
> > 
> > For now the only user is fs_holder_ops::mark_dead(), which will call
> > shutdown_bdev() if supported.
> > If not supported then fallback to the original shutdown() callback.
> > 
> > Btrfs is going to add the usage of shutdown_bdev() soon.
> > 
> > Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
> 
> Thanks for the patch. I think that we could actually add 'bdev' that
> triggered shutdown among arguments ->shutdown takes instead of introducing
> a new handler.

I don't really think that's a good idea as-is.  The current ->shutdown
callback is called ->shutdown because it is expected to shut the file
system down.  That's why I suggested to Qu to add a new devloss callback,
to describe that a device is lost.  In a file system with built-in
redundancy that is not a shutdown.  So Qu, please add a devloss
callback.  And maybe if we have no other good use for the shutdown
callback we can remove it in favor of the devloss one.  But having
something named shutdown take the block device and not always shutting
the file system down is highly confusing.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux