diff mbox

[1/2] ext4: Improve credit estimate for EXT4_SINGLEDATA_TRANS_BLOCKS

Message ID 1365496448-9907-1-git-send-email-jack@suse.cz
State Accepted, archived
Headers show

Commit Message

Jan Kara April 9, 2013, 8:34 a.m. UTC
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>
---
 fs/ext4/ext4_jbd2.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Comments

Theodore Ts'o April 9, 2013, 4:42 p.m. UTC | #1
On Tue, Apr 09, 2013 at 10:34:07AM +0200, Jan Kara wrote:
> 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>

Thanks, added to the dev branch for testing.

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

Patch

diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
index 4c216b1..042e463 100644
--- a/fs/ext4/ext4_jbd2.h
+++ b/fs/ext4/ext4_jbd2.h
@@ -29,11 +29,13 @@ 
  * block to complete the transaction.
  *
  * 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)				\
 	(EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)   \
-	 ? 27U : 8U)
+	 ? 20U : 8U)
 
 /* Extended attribute operations touch at most two data buffers,
  * two bitmap buffers, and two group summaries, in addition to the inode