]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: retry block allocation for failed DIO and DAX writes
authorJan Kara <jack@suse.cz>
Fri, 1 Apr 2016 06:07:22 +0000 (02:07 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 1 Apr 2016 06:07:22 +0000 (02:07 -0400)
commit605794cd96fde8aa191b708ac2d7b3a2f16b4452
treed00b3abe754efacc314909b85ceede6d922c533c
parentd08e700d9c68c51fea57bf0093fb0316381badec
ext4: retry block allocation for failed DIO and DAX writes

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: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
fs/ext4/inode.c