Skip to contentSkip to conversation

btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups

PATCH In review Marcos Paulo de Souza 3 participants 3 messages Mar 15, 2020 – Mar 23, 2020 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups

From: Marcos Paulo de Souza <[email protected]>

Since 1d5b2ad9 ("btrfs-progs: qgroup-verify: Don't treat qgroup difference as error if the fs hasn't initialized a rescan") a new message is being printed when the qgroups is incosistent and the rescan hasn't being executed, so remove the later message send to stderr.

While in this function, simplify the check for a not executed rescan since !counts.rescan_running and counts.rescan_running == 0 means the same thing.

---
 check/qgroup-verify.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
check/qgroup-verify.c +1 -4
index afe15acf..685370d6 100644
@@ -1336,14 +1336,11 @@ int report_qgroups(int all)
 	/*
 	 * It's possible that rescan hasn't been initialized yet.
 	 */
-	if (counts.qgroup_inconsist && !counts.rescan_running &&
-	    counts.rescan_running == 0) {
+	if (counts.qgroup_inconsist && !counts.rescan_running) {
 		printf(
 "Rescan hasn't been initialized, a difference in qgroup accounting is expected\n");
 		skip_err = true;
 	}
-	if (counts.qgroup_inconsist && !counts.rescan_running)
-		fprintf(stderr, "Qgroup are marked as inconsistent.\n");
 	node = rb_first(&counts.root);
 	while (node) {
 		c = rb_entry(node, struct qgroup_count, rb_node);
Signature · 1 line
2.25.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Marcos Paulo de Souza

From: Marcos Paulo de Souza <[email protected]>

Since 1d5b2ad9 ("btrfs-progs: qgroup-verify: Don't treat qgroup difference as error if the fs hasn't initialized a rescan") a new message is being printed when the qgroups is incosistent and the rescan hasn't being executed, so remove the later message send to stderr.

Quoted 5 lines

While in this function, simplify the check for a not executed rescan since !counts.rescan_running and counts.rescan_running == 0 means the same thing.

Thanks,
Qu

Quoted 25 lines
---
 check/qgroup-verify.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
check/qgroup-verify.c +1 -4
index afe15acf..685370d6 100644
@@ -1336,14 +1336,11 @@ int report_qgroups(int all)
 	/*
 	 * It's possible that rescan hasn't been initialized yet.
 	 */
-	if (counts.qgroup_inconsist && !counts.rescan_running &&
-	    counts.rescan_running == 0) {
+	if (counts.qgroup_inconsist && !counts.rescan_running) {
 		printf(
 "Rescan hasn't been initialized, a difference in qgroup accounting is expected\n");
 		skip_err = true;
 	}
-	if (counts.qgroup_inconsist && !counts.rescan_running)
-		fprintf(stderr, "Qgroup are marked as inconsistent.\n");
 	node = rb_first(&counts.root);
 	while (node) {
 		c = rb_entry(node, struct qgroup_count, rb_node);
#2 lore raw
In reply to Marcos Paulo de Souza
Quoted 7 lines · Marcos Paulo de Souza

From: Marcos Paulo de Souza <[email protected]>

Since 1d5b2ad9 ("btrfs-progs: qgroup-verify: Don't treat qgroup difference as error if the fs hasn't initialized a rescan") a new message is being printed when the qgroups is incosistent and the rescan hasn't being executed, so remove the later message send to stderr.

Quoted 5 lines

While in this function, simplify the check for a not executed rescan since !counts.rescan_running and counts.rescan_running == 0 means the same thing.

Added to devel, thanks.