Skip to contentSkip to conversation

btrfs: sysfs: export the balance paused state of exclusive operation

PATCH In review David Sterba 3 participants 3 messages May 3, 2022 – May 11, 2022 Btrfs file system

lore
Share & tools
lore

David Sterba

author maintainer
#0 lore raw

PATCH 1/1 btrfs: sysfs: export the balance paused state of exclusive operation

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")
---
 fs/btrfs/sysfs.c | 3 +++
 1 file changed, 3 insertions(+)
fs/btrfs/sysfs.c +3 -0
index 366424222b4f..92a1fa8e3da6 100644
@@ -957,6 +957,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;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · David Sterba

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")
Quoted 18 lines
---
  fs/btrfs/sysfs.c | 3 +++
  1 file changed, 3 insertions(+)
fs/btrfs/sysfs.c +3 -0
index 366424222b4f..92a1fa8e3da6 100644
@@ -957,6 +957,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;
Reviewed-by on v1 1/1
#2 lore raw
In reply to David Sterba
Quoted 7 lines · David Sterba

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")

looks good.

Quoted 18 lines
---
  fs/btrfs/sysfs.c | 3 +++
  1 file changed, 3 insertions(+)
fs/btrfs/sysfs.c +3 -0
index 366424222b4f..92a1fa8e3da6 100644
@@ -957,6 +957,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;