[PATCH 5.17 028/140] btrfs: sysfs: export the balance paused state of exclusive operation

From: Greg Kroah-Hartman
Date: Tue May 10 2022 - 10:15:21 EST


From: David Sterba <dsterba@xxxxxxxx>

commit 3e1ad196385c65c1454aceab1226d9a4baca27d5 upstream.

The new state allowing device addition with paused balance is not
exported to user space so it can't recognize it and actually start the
operation.

Fixes: efc0e69c2fea ("btrfs: introduce exclusive operation BALANCE_PAUSED state")
CC: stable@xxxxxxxxxxxxxxx # 5.17
Signed-off-by: David Sterba <dsterba@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
fs/btrfs/sysfs.c | 3 +++
1 file changed, 3 insertions(+)

--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -919,6 +919,9 @@ static ssize_t btrfs_exclusive_operation
case BTRFS_EXCLOP_BALANCE:
str = "balance\n";
break;
+ case BTRFS_EXCLOP_BALANCE_PAUSED:
+ str = "balance paused\n";
+ break;
case BTRFS_EXCLOP_DEV_ADD:
str = "device add\n";
break;