[PATCH 0/3] Balance vs device add fixes

Nikolay Borisov
2021-11-01T11:53:29Z

This series enables adding of a device when balance is paused (i.e an fs is mounted
with skip_balance options). This is needed to give users a chance to gracefully
handle an ENOSPC situation in the face of running balance. To achieve this introduce
a new exclop - BALANCE_PAUSED which is made compatible with device add. More
details in each patche.

I've tested this with an fstests which I will be posting in a bit.

Nikolay Borisov (3):
btrfs: introduce BTRFS_EXCLOP_BALANCE_PAUSED exclusive state
btrfs: make device add compatible with paused balance in
btrfs_exclop_start_try_lock
btrfs: allow device add if balance is paused

fs/btrfs/ctree.h | 1 +
fs/btrfs/ioctl.c | 49 +++++++++++++++++++++++++++++++++++++++-------
fs/btrfs/volumes.c | 23 ++++++++++++++++++----
fs/btrfs/volumes.h | 2 +-
4 files changed, 63 insertions(+), 12 deletions(-)

--
2.25.1