summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-06-16 13:58:14 +0200
committerChristian Brauner <brauner@kernel.org>2026-06-29 10:31:49 +0200
commitea4e4cc263011910eb7c62f3bb4fa094a1573c61 (patch)
tree9e99938b22316fcc6a58850aa15ebb2a25908843 /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
block: allow making a block device unfreezable
Add bdev_deny_freeze() and bdev_allow_freeze(), modeled on deny_write_access()/allow_write_access(). bd_fsfreeze_count becomes a signed counter: > 0 counts active freezes, < 0 counts deniers, and the two regimes are mutually exclusive. bdev_freeze() refuses with -EBUSY while a deny is held, and bdev_deny_freeze() refuses while the device is frozen. A filesystem that mutates a device's membership (a btrfs device add, remove or replace) denies freezing on the device for the duration, so a claim a freeze walk might act on is never added or torn down behind the freezer's back. The deny/allow helpers are a single atomic on bd_fsfreeze_count and take no lock, so they can be called while holding s_umount without inverting against bdev_freeze()'s bd_fsfreeze_mutex -> s_umount order. Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260616-work-super-freeze_deny_upstream-v2-1-b3567c7f994b@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions