public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 9/10] Fix bugs in multi-block allocation and locality-group
@ 2007-06-21  1:56 Takashi Sato
  0 siblings, 0 replies; only message in thread
From: Takashi Sato @ 2007-06-21  1:56 UTC (permalink / raw)
  To: linux-ext4, linux-fsdevel

- Move lg_list to s_locality_dirty in ext4_lg_sync_single_group()
  to flush all of dirty inodes.
- Fix ext4_mb_new_blocks() to return err value when defrag failed.

Signed-off-by: Takashi Sato <t-sato@yk.jp.nec.com>
Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
---
diff -X Online-Defrag_linux-2.6.19-rc6-git/Documentation/dontdiff -upNr linux-2.6.19-rc6-test3/fs/ext4/lg.c Online-Defrag_linux-2.6.19-rc6-git/fs/ext4/lg.c
--- linux-2.6.19-rc6-test3/fs/ext4/lg.c	2007-06-20 16:56:16.000000000 +0900
+++ Online-Defrag_linux-2.6.19-rc6-git/fs/ext4/lg.c	2007-06-18 14:21:54.000000000 +0900
@@ -389,6 +389,10 @@ int ext4_lg_sync_single_group(struct sup
 		cond_resched();
 		spin_lock(&inode_lock);
 		if (wbc->nr_to_write <= 0) {
+			if (!list_empty(&lg->lg_io)) {
+				set_bit(EXT4_LG_DIRTY, &lg->lg_flags);
+				list_move(&lg->lg_list, &sbi->s_locality_dirty);
+			}
 			rc = EXT4_STOP_WRITEBACK;
 			code = 6;
 			break;
diff -X Online-Defrag_linux-2.6.19-rc6-git/Documentation/dontdiff -upNr linux-2.6.19-rc6-test3/fs/ext4/mballoc.c Online-Defrag_linux-2.6.19-rc6-git/fs/ext4/mballoc.c
--- linux-2.6.19-rc6-test3/fs/ext4/mballoc.c	2007-06-20 16:58:22.000000000 +0900
+++ Online-Defrag_linux-2.6.19-rc6-git/fs/ext4/mballoc.c	2007-06-18 14:21:54.000000000 +0900
@@ -3732,8 +3732,10 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t
 		!(EXT4_I(ar->inode)->i_state & EXT4_STATE_BLOCKS_RESERVED)) {
 		reserved = ar->len;
 		err = ext4_reserve_blocks(sb, reserved);
-		if (err)
+		if (err) {
+			*errp = err;
 			return err;
+		}
 	}
 
 	if (!ext4_mb_use_preallocated(&ac)) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-21  1:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-21  1:56 [RFC][PATCH 9/10] Fix bugs in multi-block allocation and locality-group Takashi Sato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox