From: Wang Shilong Date: Wed, 27 Feb 2013 11:16:57 +0000 (+0000) Subject: Btrfs: fix missing deleted items in btrfs_clean_quota_tree X-Git-Tag: v3.9-rc1~17^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06b3a860dcf596bdc2bb1cca3252d3907b581938;p=pandora-kernel.git Btrfs: fix missing deleted items in btrfs_clean_quota_tree Steps to reproduce: i=0 ncases=100 mkfs.btrfs mount btrfs quota enable btrfs qgroup create 2/1 while [ $i -le $ncases ] do btrfs qgroup create 1/$i btrfs qgroup assign 1/$i 2/1 i=$(($i+1)) done btrfs quota disable umount btrfsck You can also use the commands: btrfs-debug-tree | grep QGROUP You will find there are still items existed.The reasons why this happens is because the original code just checks slots[0]==0 and returns. We try to fix it by deleting the leaf one by one. Signed-off-by: Wang Shilong Signed-off-by: Miao Xie Signed-off-by: Josef Bacik --- Reading git-diff-tree failed