Skip to content

Commit

Permalink
ext4: clear buffer_uninit flag when submitting IO
Browse files Browse the repository at this point in the history
Currently noone cleared buffer_uninit flag. This results in writeback
needlessly marking io_end as needing extent conversion scanning extent
tree for extents to convert. So clear the buffer_uninit flag once the
buffer is submitted for IO and the flag is transformed into
EXT4_IO_END_UNWRITTEN flag.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
  • Loading branch information
Jan Kara authored and Theodore Ts'o committed Apr 12, 2013
1 parent 4eec708 commit 7b001d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/page-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static int io_submit_add_bh(struct ext4_io_submit *io,
if (ret != bh->b_size)
goto submit_and_retry;
io_end = io->io_end;
if (buffer_uninit(bh))
if (test_clear_buffer_uninit(bh))
ext4_set_io_unwritten_flag(inode, io_end);
io_end->size += bh->b_size;
io->io_next_block++;
Expand Down

0 comments on commit 7b001d6

Please sign in to comment.