linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups
@ 2020-03-15  3:42 Marcos Paulo de Souza
  2020-03-16 12:04 ` Qu Wenruo
  2020-03-23 19:39 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Marcos Paulo de Souza @ 2020-03-15  3:42 UTC (permalink / raw)
  To: linux-btrfs, wqu, dsterba; +Cc: Marcos Paulo de Souza

From: Marcos Paulo de Souza <mpdesouza@suse.com>

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.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 check/qgroup-verify.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/check/qgroup-verify.c b/check/qgroup-verify.c
index afe15acf..685370d6 100644
--- a/check/qgroup-verify.c
+++ b/check/qgroup-verify.c
@@ -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.25.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups
  2020-03-15  3:42 [PATCH] btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups Marcos Paulo de Souza
@ 2020-03-16 12:04 ` Qu Wenruo
  2020-03-23 19:39 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2020-03-16 12:04 UTC (permalink / raw)
  To: Marcos Paulo de Souza, linux-btrfs, wqu, dsterba; +Cc: Marcos Paulo de Souza


[-- Attachment #1.1: Type: text/plain, Size: 1610 bytes --]



On 2020/3/15 上午11:42, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
> 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.
> 
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
>  check/qgroup-verify.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/check/qgroup-verify.c b/check/qgroup-verify.c
> index afe15acf..685370d6 100644
> --- a/check/qgroup-verify.c
> +++ b/check/qgroup-verify.c
> @@ -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);
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups
  2020-03-15  3:42 [PATCH] btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups Marcos Paulo de Souza
  2020-03-16 12:04 ` Qu Wenruo
@ 2020-03-23 19:39 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2020-03-23 19:39 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: linux-btrfs, wqu, dsterba, Marcos Paulo de Souza

On Sun, Mar 15, 2020 at 12:42:53AM -0300, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
> 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.
> 
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

Added to devel, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-23 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15  3:42 [PATCH] btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups Marcos Paulo de Souza
2020-03-16 12:04 ` Qu Wenruo
2020-03-23 19:39 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).