]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: optimize locking for end_io extent conversion
authorTheodore Ts'o <tytso@mit.edu>
Mon, 31 Oct 2011 14:56:32 +0000 (10:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 31 Oct 2011 14:56:32 +0000 (10:56 -0400)
commit138d9e5e53d76ce25d181dbdb7f8818237ce314b
tree42bde122000b3bf3adf7eaa0328e0fdafdb3b5fd
parentfc3a96880cb02118bfb6eb9c420959a8ab696742
ext4: optimize locking for end_io extent conversion

Now that we are doing the locking correctly, we need to grab the
i_completed_io_lock() twice per end_io.  We can clean this up by
removing the structure from the i_complted_io_list, and use this as
the locking mechanism to prevent ext4_flush_completed_IO() racing
against ext4_end_io_work(), instead of clearing the
EXT4_IO_END_UNWRITTEN in io->flag.

In addition, if the ext4_convert_unwritten_extents() returns an error,
we no longer keep the end_io structure on the linked list.  This
doesn't help, because it tends to lock up the file system and wedges
the system.  That's one way to call attention to the problem, but it
doesn't help the overall robustness of the system.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/fsync.c
fs/ext4/page-io.c