• Lukas Czerner's avatar
    ext4: wait for existing dio workers in ext4_alloc_file_blocks() · 0d306dcf
    Lukas Czerner authored
    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: default avatarLukas Czerner <lczerner@redhat.com>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    0d306dcf
extents.c 162 KB