Move lg_list to s_locality_dirty and mark lg as dirty
if nr_to_write(total page count which has not written in disk yet)
is 0 or less and lg_io is not empty in ext4_lg_sync_single_group(). 
This makes sure that inode is written to disk.

Signed-off-by: Takashi Sato <[EMAIL PROTECTED]>
---
diff -Nrup -X linux-2.6.19-rc6-lg/Documentation/dontdiff 
linux-2.6.19-rc6-lg/fs/ext4/lg.c linux-2.6.19-rc6-full/fs/ext4/lg.c
--- linux-2.6.19-rc6-lg/fs/ext4/lg.c    2007-04-26 19:55:37.000000000 +0900
+++ linux-2.6.19-rc6-full/fs/ext4/lg.c  2007-04-26 19:17:59.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;
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to