Author: Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:30:34 2007 -0700
Committer: Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:43:02 2007 -0700
writeback: fix time ordering of the per superblock dirty inode lists 3
While writeback is working against a dirty inode it does a check after
to write some of the inode's pages:
"did the lower layers skip some of the inode's dirty pages because they were
locked (or under writeback, or whatever)"
If this turns out to be true, we must move the inode back onto s_dirty and
redirty it. The reason for doing this is that fsync() and friends only
the s_dirty list, and those functions want to know about those pages which
were locked, so they can be waited upon and, if necessary, rewritten.
Problem is, that redirtying was putting the inode onto the tail of s_dirty
without updating its timestamp. This causes a violation of s_dirty
Fix this by updating inode->dirtied_when when moving the inode onto s_dirty.
But the code is still a bit buggy? If the inode was _already_ dirty then we
don't need to move it at all. Oh well, hopefully it doesn't matter too
as that was a redirtying, which was very recent anwyay.
Cc: Mike Waychison <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
fs/fs-writeback.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index f8618e0..66889b0 100644
@@ -413,7 +413,7 @@ sync_sb_inodes(struct super_block *sb, struct
* writeback is not making progress due to locked
* buffers. Skip this inode for now.
- list_move(&inode->i_list, &sb->s_dirty);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html