ext4: fix ext4_writepage() to achieve data=ordered guarantees
authorJan Kara <jack@suse.cz>
Tue, 29 Jan 2013 02:06:42 +0000 (21:06 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 29 Jan 2013 02:06:42 +0000 (21:06 -0500)
commitfe386132f6731d02a45c380be0a3d339e6446cb5
treeb28efc5faa2cad4823eaec0ef847a9446ef75a5b
parent8a850c3fb8d0f204eabc1a32b502f47d3c16eac4
ext4: fix ext4_writepage() to achieve data=ordered guarantees

So far ext4_writepage() skipped writing pages that had any delayed or
unwritten buffers attached. When blocksize < pagesize this breaks
data=ordered mode guarantees as we can have a page with one freshly
allocated buffer whose allocation is part of the committing
transaction and another buffer in the page which is delayed or
unwritten. So fix this problem by calling ext4_bio_writepage()
anyway. It will submit mapped buffers and leave others alone.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/inode.c