• Jan Kara's avatar
    ext4: retry block allocation for failed DIO and DAX writes · e84dfbe2
    Jan Kara authored
    Currently if block allocation for DIO or DAX write fails due to ENOSPC,
    we just returned it to userspace. However these ENOSPC errors can be
    transient because the transaction freeing blocks has not yet committed.
    This demonstrates as failures of generic/102 test when the filesystem is
    mounted with 'dax' mount option.
    
    Fix the problem by properly retrying the allocation in case of ENOSPC
    error in get blocks functions used for direct IO.
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>                                                                               
    e84dfbe2
inode.c 164 KB