[Patch 1/8] 2.4.20-pre4/ext3: fsync optimisation

From: Stephen Tweedie (sct@redhat.com)
Date: Wed Aug 28 2002 - 10:45:19 EST


fsync optimisation: save an extra unnecessary pass over the data if we
are in an ordered or journaled data mode.

--- linux-ext3-2.4merge/fs/ext3/fsync.c.=K0002=.orig Tue Aug 27 23:16:39 2002
+++ linux-ext3-2.4merge/fs/ext3/fsync.c Tue Aug 27 23:19:57 2002
@@ -62,7 +62,12 @@
          * we'll end up waiting on them in commit.
          */
         ret = fsync_inode_buffers(inode);
- ret |= fsync_inode_data_buffers(inode);
+
+ /* In writeback mode, we need to force out data buffers too. In
+ * the other modes, ext3_force_commit takes care of forcing out
+ * just the right data blocks. */
+ if (test_opt(inode->i_sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)
+ ret |= fsync_inode_data_buffers(inode);
 
         ext3_force_commit(inode->i_sb);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:23 EST