1 ext4: don't retry file block mapping on bigalloc fs with non-extent file
3 From: "Darrick J. Wong" <darrick.wong@oracle.com>
5 ext4 isn't willing to map clusters to a non-extent file. Don't signal
6 this with an out of space error, since the FS will retry the
7 allocation (which didn't fail) forever. Instead, return EUCLEAN so
8 that the operation will fail immediately all the way back to userspace.
10 (The fix is either to run e2fsck -E bmap2extent, or to chattr +e the file.)
12 Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
13 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 fs/ext4/indirect.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
18 diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
19 index 45fe924..b46f2b2 100644
20 --- a/fs/ext4/indirect.c
21 +++ b/fs/ext4/indirect.c
22 @@ -565,7 +565,7 @@ int ext4_ind_map_blocks(handle_t *handle, struct inode *inode,
23 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
24 EXT4_ERROR_INODE(inode, "Can't allocate blocks for "
25 "non-extent mapped inodes with bigalloc");
30 /* Set up for the direct block allocation */