All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs-progs: fix overflow when printing qgroup info
@ 2013-03-22 11:53 Wang Shilong
  2013-03-22 12:34 ` Jan Schmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Shilong @ 2013-03-22 11:53 UTC (permalink / raw)
  To: linux-btrfs; +Cc: koen.de.wit, wangshilong1991

From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

Since btrfs quota rescan has not been implemented yet,
a user complains that "btrfs qgroup show" lists qgroup
referenced/exclusive be negative. However, this should
not happen even if overflow happens,because the type for
qgroup referenced/exclusive is u64,fix it.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Reported-by: Koen De Wit <koen.de.wit@oracle.com>
---
 cmds-qgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 60ca33d..fc4cb13 100644
--- a/cmds-qgroup.c
+++ b/cmds-qgroup.c
@@ -105,7 +105,7 @@ static int qgroup_create(int create, int argc, char **argv)
 
 void print_qgroup_info(u64 objectid, struct btrfs_qgroup_info_item *info)
 {
-	printf("%llu/%llu %lld %lld\n", objectid >> 48,
+	printf("%llu/%llu %llu %llu\n", objectid >> 48,
 		objectid & ((1ll << 48) - 1),
 		btrfs_stack_qgroup_info_referenced(info),
 		btrfs_stack_qgroup_info_exclusive(info));
-- 
1.7.11.7


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

end of thread, other threads:[~2013-03-22 13:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 11:53 [PATCH] Btrfs-progs: fix overflow when printing qgroup info Wang Shilong
2013-03-22 12:34 ` Jan Schmidt
2013-03-22 12:42   ` Wang Shilong
2013-03-22 13:25     ` Wang Shilong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.