btrfs: sysfs: export the balance paused state of exclusive operation
authorDavid Sterba <dsterba@suse.com>
Tue, 3 May 2022 15:35:25 +0000 (17:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:32:20 +0000 (12:32 +0200)
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@vger.kernel.org # 5.17
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/sysfs.c

index beb7f72d50b86871dabda18e50a45b79bd944e40..11927d440f11a58d37b7727cd59bbc535099cf7c 100644 (file)
@@ -919,6 +919,9 @@ static ssize_t btrfs_exclusive_operation_show(struct kobject *kobj,
                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;