Skip to content

Commit f45a5ef

Browse files
jankaratytso
authored andcommitted
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: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent eabe044 commit f45a5ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/ext4/ext4_jbd2.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@
2929
* block to complete the transaction.
3030
*
3131
* For extents-enabled fs we may have to allocate and modify up to
32-
* 5 levels of tree + root which are stored in the inode. */
32+
* 5 levels of tree, data block (for each of these we need bitmap + group
33+
* summaries), root which is stored in the inode, sb
34+
*/
3335

3436
#define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \
3537
(EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \
36-
? 27U : 8U)
38+
? 20U : 8U)
3739

3840
/* Extended attribute operations touch at most two data buffers,
3941
* two bitmap buffers, and two group summaries, in addition to the inode

0 commit comments

Comments
 (0)