linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch 1/8] 2.4.20-pre4/ext3: fsync optimisation
@ 2002-08-28 15:45 Stephen Tweedie
  0 siblings, 0 replies; only message in thread
From: Stephen Tweedie @ 2002-08-28 15:45 UTC (permalink / raw)
  To: Marcelo Tosatti, linux-kernel; +Cc: Stephen Tweedie

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);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-28 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-28 15:45 [Patch 1/8] 2.4.20-pre4/ext3: fsync optimisation Stephen Tweedie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).