summaryrefslogtreecommitdiff
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-10-16 23:30:36 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 08:43:02 -0700
commitc6945e77e477103057b4a639b4b01596f5257861 (patch)
tree02e6b473143060cdec08f3d8447512d56ea699bd /fs/fs-writeback.c
parent1b43ef91d40190b16ba10218e66d5c2c4ba11de3 (diff)
writeback: fix time ordering of the per superblock dirty inode lists 5
When the writeback function is operating in writeback-for-flushing mode (as opposed to writeback-for-integrity) and it encounters an I_LOCKed inode, it will skip writing that inode. This is done for throughput and latency: move on to another inode rather than blocking for this one. Writeback skips this inode by moving it off s_io and onto s_dirty, so that writeback can proceed with the other inodes on s_io. However that inode movement can corrupt s_dirty's reverse-time-orderedness. Fix that by using the new redirty_tail(), which will update the refiled inode's dirtied_when field. Note: the behaviour in here is a bit rude: if kupdate happens to come across a locked inode then it will defer writeback of that inode for another 30 seconds. We'll address that in the next patch. Cc: Mike Waychison <mikew@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index a3d7a829137d..1b43cc9d9ebb 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -308,7 +308,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
struct address_space *mapping = inode->i_mapping;
int ret;
- list_move(&inode->i_list, &inode->i_sb->s_dirty);
+ redirty_tail(inode);
/*
* Even if we don't actually write the inode itself here,