Re: [Bug 15910] zero-length files and performance degradation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tytso
Date: Monday, May 10, 2010 - 7:34 am

On Mon, May 10, 2010 at 10:22:47PM +0800, Peng Tao wrote:

There are programs to do who execute fsync() on a directory, and they
do not expect a recursive fsync() on all files/subdirectories in a
directory.

At least for Linux, sync() is synchronous and will do what you want.
There is unfortunately not a portable way to do what you want short of
fsync'ing all of the files after they are written.  This case is
mostly optimized under ext3/4 (we could do a bit better for ext4, but
the performance shouldn't be disastrous --- certainly much better than
write a file, fsync, rename a file, repeat).

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Wed May 5, 11:54 am)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Wed May 5, 9:06 pm)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Wed May 5, 9:18 pm)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Sun May 9, 11:19 am)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Sun May 9, 8:49 pm)
Re: [Bug 15910] zero-length files and performance degradation, tytso, (Mon May 10, 7:34 am)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Mon May 10, 7:36 am)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Mon May 10, 7:52 am)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Mon May 10, 10:23 am)
[Bug 15910] zero-length files and performance degradation, bugzilla-daemon, (Mon May 10, 3:33 pm)