aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/api/debug.h
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2025-07-14 05:25:57 +0000
committerChristian Brauner <[email protected]>2025-07-15 11:36:40 +0000
commitd9c37a4904ec21ef7d45880fe023c11341869c28 (patch)
tree81bbc7c4e5b55fd56adb186332121f34eaa76b5f /tools/lib/api/debug.h
parentLinux 6.16-rc1 (diff)
downloadkernel-d9c37a4904ec21ef7d45880fe023c11341869c28.tar.gz
kernel-d9c37a4904ec21ef7d45880fe023c11341869c28.zip
fs: add a new remove_bdev() callback
Currently all filesystems which implement super_operations::shutdown() can not afford losing a device. Thus fs_bdev_mark_dead() will just call the ->shutdown() callback for the involved filesystem. But it will no longer be the case, as multi-device filesystems like btrfs and bcachefs can handle certain device loss without the need to shutdown the whole filesystem. To allow those multi-device filesystems to be integrated to use fs_holder_ops: - Add a new super_operations::remove_bdev() callback - Try ->remove_bdev() callback first inside fs_bdev_mark_dead() If the callback returned 0, meaning the fs can handling the device loss, then exit without doing anything else. If there is no such callback or the callback returned non-zero value, continue to shutdown the filesystem as usual. This means the new remove_bdev() should only do the check on whether the operation can continue, and if so do the fs specific handlings. The shutdown handling should still be handled by the existing ->shutdown() callback. For all existing filesystems with shutdown callback, there is no change to the code nor behavior. Btrfs is going to implement both the ->remove_bdev() and ->shutdown() callbacks soon. Signed-off-by: Qu Wenruo <[email protected]> Link: https://lore.kernel.org/09909fcff7f2763cc037fec97ac2482bdc0a12cb.1752470276.git.wqu@suse.com Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'tools/lib/api/debug.h')
0 files changed, 0 insertions, 0 deletions