diff options
author | Qu Wenruo <wqu@suse.com> | 2017-12-21 06:42:04 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-04-18 16:46:51 +0200 |
commit | ff6bc37eb7f6e7b052e50c13a480e1080b3ec07a (patch) | |
tree | 9a583583fbd29c65d866562c3f54daf6f9de445d /fs/ocfs2/dlm/dlmcommon.h | |
parent | btrfs: qgroup: Commit transaction in advance to reduce early EDQUOT (diff) | |
download | linux-ff6bc37eb7f6e7b052e50c13a480e1080b3ec07a.tar.xz linux-ff6bc37eb7f6e7b052e50c13a480e1080b3ec07a.zip |
btrfs: qgroup: Use independent and accurate per inode qgroup rsv
Unlike reservation calculation used in inode rsv for metadata, qgroup
doesn't really need to care about things like csum size or extent usage
for the whole tree COW.
Qgroups care more about net change of the extent usage.
That's to say, if we're going to insert one file extent, it will mostly
find its place in COWed tree block, leaving no change in extent usage.
Or causing a leaf split, resulting in one new net extent and increasing
qgroup number by nodesize.
Or in an even more rare case, increase the tree level, increasing qgroup
number by 2 * nodesize.
So here instead of using the complicated calculation for extent
allocator, which cares more about accuracy and no error, qgroup doesn't
need that over-estimated reservation.
This patch will maintain 2 new members in btrfs_block_rsv structure for
qgroup, using much smaller calculation for qgroup rsv, reducing false
EDQUOT.
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
0 files changed, 0 insertions, 0 deletions