]> 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)
commitdf6086959d5dff311b40b1ba6f4f18adc6749921
tree3a2450687319c4d9f7775dc48f40ba500ad91282
parent5d719f9d3f0e7cb23ca6066e298655fa917821e8
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