On 12/21/2013 03:56 AM, Wang Shilong wrote:
Hello Josef,

Though i know there are still problems related to qgroup(for example removing 
snapshot
will beak qgroup accounting).I did a simple test about your patch..


# btrfs quota enable /mnt
# dd if=/dev/zero of=/mnt/data bs=4k count=102400 oflag=direct
# btrfs sub snapshot /mnt/ /mnt/snap1
# btrfs sub snapshot /mnt /mnt/snap2
# btrfs sub delete /mnt/snap1 /mnt/snap2
# sync
# rm -rf /mnt/data
# sync
# dmesg
# btrfs qgroup show /mnt


Firstly, qgroup accounting is wrong, this is maybe expected because efficient  
fs tree removal.
However, from dmesg, i get the  WARNING:

WARNING: CPU: 1 PID: 2650 at fs/btrfs/qgroup.c:1486 
btrfs_delayed_qgroup_accounting

I did not take a deep look at codes, but i think you will be interested in 
taking a look at this. ^_^

Ok I finally sat down to look at this and it is because subvol deletion screws up quota accounting no matter what. I just added this WARN_ON() to catch actual mistakes, it just so happens it gets tripped when the snapshot deletion stuff happens too. I'm going to put this on the "I'll deal with it later" list since it is an existing issue with or without my patch. Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to