]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: wait for existing dio workers in ext4_alloc_file_blocks()
authorLukas Czerner <lczerner@redhat.com>
Mon, 15 Jun 2015 04:23:53 +0000 (00:23 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 15 Jun 2015 04:23:53 +0000 (00:23 -0400)
commit71bb5a4b74108c6cda2c7e5d67f7b5088f860804
treeb743cc959d2d401bbe9e33f5fdcdb931f08175ea
parent718281c78b6c44e7616dde2cfcdf82688791b9e7
ext4: wait for existing dio workers in ext4_alloc_file_blocks()

Currently existing dio workers can jump in and potentially increase
extent tree depth while we're allocating blocks in
ext4_alloc_file_blocks().  This may cause us to underestimate the
number of credits needed for the transaction because the extent tree
depth can change after our estimation.

Fix this by waiting for all the existing dio workers in the same way
as we do it in ext4_punch_hole.  We've seen errors caused by this in
xfstest generic/299, however it's really hard to reproduce.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c