Commit f45a5ef9 authored by Jan Kara's avatar Jan Kara Committed by Theodore Ts'o

ext4: improve credit estimate for EXT4_SINGLEDATA_TRANS_BLOCKS

Estimate of 27 credits for allocation of a block in extent based inode
is unnecessarily high. We can easily argue 20 is enough.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent eabe0444
...@@ -29,11 +29,13 @@ ...@@ -29,11 +29,13 @@
* block to complete the transaction. * block to complete the transaction.
* *
* For extents-enabled fs we may have to allocate and modify up to * For extents-enabled fs we may have to allocate and modify up to
* 5 levels of tree + root which are stored in the inode. */ * 5 levels of tree, data block (for each of these we need bitmap + group
* summaries), root which is stored in the inode, sb
*/
#define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \ #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \
(EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \
? 27U : 8U) ? 20U : 8U)
/* Extended attribute operations touch at most two data buffers, /* Extended attribute operations touch at most two data buffers,
* two bitmap buffers, and two group summaries, in addition to the inode * two bitmap buffers, and two group summaries, in addition to the inode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment