summaryrefslogtreecommitdiff
path: root/fs/ext4/crypto.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2015-06-08 15:40:40 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2015-06-08 15:40:40 (GMT)
commit42ac1848eac58875ceb081c2ed915d6f07ec1f30 (patch)
tree6d6e4eb5d148907fd08bd605c0021820720cd737 /fs/ext4/crypto.c
parentbbdc322f2c600667e3d23dfadf8bbaad08f7edd3 (diff)
downloadlinux-42ac1848eac58875ceb081c2ed915d6f07ec1f30.tar.xz
ext4: return error code from ext4_mb_good_group()
Currently ext4_mb_good_group() only returns 0 or 1 depending on whether the allocation group is suitable for use or not. However we might get various errors and fail while initializing new group including -EIO which would never get propagated up the call chain. This might lead to an endless loop at writeback when we're trying to find a good group to allocate from and we fail to initialize new group (read error for example). Fix this by returning proper error code from ext4_mb_good_group() and using it in ext4_mb_regular_allocator(). In ext4_mb_regular_allocator() we will always return only the first occurred error from ext4_mb_good_group() and we only propagate it back to the caller if we do not get any other errors and we fail to allocate any blocks. Note that with other modes than errors=continue, we will fail immediately in ext4_mb_good_group() in case of error, however with errors=continue we should try to continue using the file system, that's why we're not going to fail immediately when we see an error from ext4_mb_good_group(), but rather when we fail to find a suitable block group to allocate from due to an problem in group initialization. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/ext4/crypto.c')
0 files changed, 0 insertions, 0 deletions