linux/fs/ext4
Dmitry Monakhov 60d4616f3d ext4: serialize fallocate with ext4_convert_unwritten_extents
Fallocate should wait for pended ext4_convert_unwritten_extents()
otherwise following race may happen:

ftruncate( ,12288);
fallocate( ,0, 4096)
io_sibmit( ,0, 4096); /* Write to fallocated area, split extent if needed */
fallocate( ,0, 8192); /* Grow extent and broke assumption about extent */

Later kwork completion will do:
 ->ext4_convert_unwritten_extents (0, 4096)
   ->ext4_map_blocks(handle, inode, &map, EXT4_GET_BLOCKS_IO_CONVERT_EXT);
    ->ext4_ext_map_blocks() /* Will find new extent:  ex = [0,2] !!!!!! */
      ->ext4_ext_handle_uninitialized_extents()
        ->ext4_convert_unwritten_extents_endio()
        /* convert [0,2] extent to initialized, but only[0,1] was written */

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-10-05 11:32:02 -04:00
..
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
extents.c ext4: serialize fallocate with ext4_convert_unwritten_extents 2012-10-05 11:32:02 -04:00
file.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
fsync.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
hash.c
ialloc.c
indirect.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
inode.c ext4: fix mtime update in nodelalloc mode 2012-09-30 23:04:56 -04:00
ioctl.c
Kconfig
Makefile
mballoc.c
mballoc.h
migrate.c
mmp.c
move_extent.c ext4: serialize dio nonlocked reads with defrag workers 2012-09-29 00:41:21 -04:00
namei.c
page-io.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
resize.c
super.c ext4: give i_aiodio_unwritten a more appropriate name 2012-09-28 23:24:52 -04:00
symlink.c
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c
xattr.h