Skip to content

Commit

Permalink
ext4: don't retry file block mapping on bigalloc fs with non-extent file
Browse files Browse the repository at this point in the history
ext4 isn't willing to map clusters to a non-extent file.  Don't signal
this with an out of space error, since the FS will retry the
allocation (which didn't fail) forever.  Instead, return EUCLEAN so
that the operation will fail immediately all the way back to userspace.

(The fix is either to run e2fsck -E bmap2extent, or to chattr +e the file.)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
  • Loading branch information
Darrick J. Wong authored and Theodore Ts'o committed Jun 22, 2015
1 parent c5e298a commit 292db1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/indirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ int ext4_ind_map_blocks(handle_t *handle, struct inode *inode,
EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
EXT4_ERROR_INODE(inode, "Can't allocate blocks for "
"non-extent mapped inodes with bigalloc");
return -ENOSPC;
return -EUCLEAN;
}

/* Set up for the direct block allocation */
Expand Down

0 comments on commit 292db1b

Please sign in to comment.