Btrfs-progs: check the relation of two group by real level numbers
Comparing qgroupid is not good way to check the relationship of two groups, the right way is to compare the real level numbers. Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Gene Czarcinski <gene@czarc.net>
This commit is contained in:
parent
9886166880
commit
19def05127
|
@ -50,7 +50,7 @@ static int qgroup_assign(int assign, int argc, char **argv)
|
||||||
/*
|
/*
|
||||||
* FIXME src should accept subvol path
|
* 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);
|
fprintf(stderr, "ERROR: bad relation requested '%s'\n", path);
|
||||||
return 12;
|
return 12;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue