Skip to contentSkip to conversation

Btrfs-progs: check the relation of two group by real level numbers

PATCH New Miao Xie 1 participant 1 message Nov 8, 2012 1 message not in the archive Btrfs file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Miao Xie

author
#1 lore raw

PATCH 3/3 Btrfs-progs: check the relation of two group by real level numbers

From: Wang Shilong <[email protected]>

Comparing qgroupid is not good way to check the relationship of two groups, the right way is to compare the real level numbers.

---
 cmds-qgroup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cmds-qgroup.c +1 -1
index c4122bf..70019d0 100644
@@ -50,7 +50,7 @@ static int qgroup_assign(int assign, int argc, char **argv)
 	/*
 	 * FIXME src should accept subvol path
 	 */
-	if (args.src >= args.dst) {
+	if ((args.src >> 48) >= (args.dst >> 48)) {
 		fprintf(stderr, "ERROR: bad relation requested '%s'\n", path);
 		return 12;
 	}

-- 1.7.7.6