[PATCH v2 00/10] Implement freeze and thaw as holder operations

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

 



Hey Christoph,
Hey Jan,
Hey Darrick,

This is v2 and based on vfs.super. I'm sending this out right now
because frankly, shortly before the merge window is the time when I have
time to do something. Otherwise, I would've waited a bit.

This implements block device freezing and thawing as holder operations.

This allows us to extend block device freezing to all devices associated
with a superblock and not just the main device.

It also allows us to remove get_active_super() and thus another function
that scans the global list of superblocks.

Freezing via additional block devices only works if the filesystem
chooses to use @fs_holder_ops for these additional devices as well. That
currently only includes ext4 and xfs.

Earlier releases switched get_tree_bdev() and mount_bdev() to use
@fs_holder_ops. The remaining nilfs2 open-coded version of mount_bdev()
has been converted to rely on @fs_holder_ops as well. So block device
freezing for the main block device will continue to work as before.

There should be no regressions in functionality. The only special case
is btrfs where block device freezing for the main block device never
worked because sb->s_bdev isn't set. Block device freezing for btrfs can
be fixed once they can switch to @fs_holder_ops but that can happen
whenever they're ready.

This survives

(1) xfstests: check -g quick
(2) xfstests: check -g freeze
(3) blktests: check

Thanks!
Christian

Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>

Changes in v2:
- Call sync_blockdev() consistently under bd_holder_lock.
- Return early with error in fs_bdev_freeze() if we can't get an active
  reference and don't call sync_blockdev().
- Keep bd_fsfreeze_mutex now that we don't hold bd_holder_lock over
  freeze and thaw anymore.
- Link to v1: https://lore.kernel.org/r/20230927-vfs-super-freeze-v1-0-ecc36d9ab4d9@xxxxxxxxxx

---



---
base-commit: 79ac81458fb58e1bac836450d6c68da1da9911d9
change-id: 20230927-vfs-super-freeze-eff650f66b06





[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