diff options
author | Frank Mayhar <fmayhar@google.com> | 2009-09-09 22:33:47 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-09-09 22:33:47 -0400 |
commit | 91ac6f43317c0bf99969665f98016548011dfa38 (patch) | |
tree | 07a49f2182dd16fdb372e4a14c263cdd2d166578 /Documentation/logo.txt | |
parent | fe188c0e084bdf3038dc0ac963c21d764f53f7da (diff) | |
download | linux-3.10-91ac6f43317c0bf99969665f98016548011dfa38.tar.gz linux-3.10-91ac6f43317c0bf99969665f98016548011dfa38.tar.bz2 linux-3.10-91ac6f43317c0bf99969665f98016548011dfa38.zip |
ext4: Make non-journal fsync work properly
Teach ext4_write_inode() and ext4_do_update_inode() about non-journal
mode: If we're not using a journal, ext4_write_inode() now calls
ext4_do_update_inode() (after getting the iloc via ext4_get_inode_loc())
with a new "do_sync" parameter. If that parameter is nonzero _and_ we're
not using a journal, ext4_do_update_inode() calls sync_dirty_buffer()
instead of ext4_handle_dirty_metadata().
This problem was found in power-fail testing, checking the amount of
loss of files and blocks after a power failure when using fsync() and
when not using fsync(). It turned out that using fsync() was actually
worse than not doing so, possibly because it increased the likelihood
that the inodes would remain unflushed and would therefore be lost at
the power failure.
Signed-off-by: Frank Mayhar <fmayhar@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'Documentation/logo.txt')
0 files changed, 0 insertions, 0 deletions