]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce exclusive operation BALANCE_PAUSED state
authorNikolay Borisov <nborisov@suse.com>
Thu, 25 Nov 2021 09:14:41 +0000 (11:14 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:23 +0000 (14:18 +0100)
commit11a02b4fdf180666354ec28d2a0a6f78cc936958
tree3a2450687319c4d9f7775dc48f40ba500ad91282
parent92048432885e0ca21dc1d002b3a751a21cf00ab5
btrfs: introduce exclusive operation BALANCE_PAUSED state

Current set of exclusive operation states is not sufficient to handle
all practical use cases. In particular there is a need to be able to add
a device to a filesystem that have paused balance. Currently there is no
way to distinguish between a running and a paused balance. Fix this by
introducing BTRFS_EXCLOP_BALANCE_PAUSED which is going to be set in 2
occasions:

1. When a filesystem is mounted with skip_balance and there is an
   unfinished balance it will now be into BALANCE_PAUSED instead of
   simply BALANCE state.

2. When a running balance is paused.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/ioctl.c
fs/btrfs/volumes.c