btrfs: qgroup: Add comments explaining how btrfs qgroup works
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Tue, 18 Oct 2016 01:31:26 +0000 (09:31 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 30 Nov 2016 12:45:21 +0000 (13:45 +0100)
commit1d2beaa95b307db5aacd527065d16ed48854d04e
treed21c179b78363876b4221c9d48e74b4e564d3c2c
parent1621f8f3f9cdfab43822aa54a84c2a0a5111b936
btrfs: qgroup: Add comments explaining how btrfs qgroup works

Add explaination how btrfs qgroups work.

Qgroup is split into 3 main phrases:
1) Reserve
   To ensure qgroup doesn't exceed its limit

2) Trace
   To info qgroup to trace which extent

3) Account
   Calculate qgroup number change for each traced extent.

This should save quite some time for new developers.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.h