diff options
| author | Dmitry Monakhov <dmonakhov@openvz.org> | 2012-10-05 11:32:02 -0400 | 
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2012-10-05 11:32:02 -0400 | 
| commit | 60d4616f3dc63371b3dc367e5e88fd4b4f037f65 (patch) | |
| tree | 1365c73827aa4efd95d805e314f13182366d1251 /lib/mpi/mpiutil.c | |
| parent | c278531d39f3158bfee93dc67da0b77e09776de2 (diff) | |
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>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions
