From: "Takashi Sato" <t-sato@yk.jp.nec.com>
To: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [RFC][PATCH 9/10] Fix bugs in multi-block allocation and locality-group
Date: Thu, 21 Jun 2007 10:56:07 +0900 [thread overview]
Message-ID: <20070621105607t-sato@rifu.yk.jp.nec.com> (raw)
- 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)) {
reply other threads:[~2007-06-21 1:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070621105607t-sato@rifu.yk.jp.nec.com \
--to=t-sato@yk.jp.nec.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox