Thread (61 messages) 61 messages, 6 authors, 2008-08-16
STALE6543d
Revisions (2)
  1. v1 current
  2. v1 [diff vs current]

[PATCH 6/6 ]Ext4 journal credits reservation fixes for defrag

From: Mingming Cao <hidden>
Date: 2008-08-12 16:37:57

defrag part change. This patch should be merged with
ext4-online-defrag-alloc-contiguous-blks.patch

Cc: Akira Fujita <redacted>
Cc: Takashi Sato <redacted>
Signed-off-by: Mingming Cao <redacted>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
Index: linux-2.6.27-rc1/fs/ext4/defrag.c
===================================================================
--- linux-2.6.27-rc1.orig/fs/ext4/defrag.c	2008-08-11 17:15:49.000000000 -0700
+++ linux-2.6.27-rc1/fs/ext4/defrag.c	2008-08-11 19:46:59.000000000 -0700
@@ -186,9 +186,9 @@ ext4_defrag_alloc_blocks(handle_t *handl
 	struct buffer_head *bh = NULL;
 	int err, i, credits = 0;
 
-	credits = ext4_ext_calc_credits_for_insert(dest_inode, dest_path);
-	err = ext4_ext_journal_restart(handle,
-				credits + EXT4_TRANS_META_BLOCKS);
+	credits = ext4_ext_calc_credits_for_single_extent(dest_inode,
+							  ar->len, dest_path);
+	err = ext4_ext_journal_restart(handle, credits);
 	if (err)
 		return err;
 

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help