summaryrefslogtreecommitdiff
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2015-06-15 07:20:46 +0300
committerTheodore Ts'o <tytso@mit.edu>2015-06-15 07:20:46 +0300
commit4134f5c88dcd5b00e4a5f37c3842b2b831a61ee1 (patch)
tree90fe66d8fdec941bff0ce300a9d74335a0f27239 /fs/ext4/ialloc.c
parentb4f1afcd068f6e533230dfed00782cd8a907f96b (diff)
downloadlinux-4134f5c88dcd5b00e4a5f37c3842b2b831a61ee1.tar.xz
ext4: recalculate journal credits as inode depth changes
Currently in ext4_alloc_file_blocks() the number of credits is calculated only once before we enter the allocation loop. However within the allocation loop the extent tree depth can change, hence the number of credits needed can increase potentially exceeding the number of credits reserved in the handle which can cause journal failures. Fix this by recalculating number of credits when the inode depth changes. Note that even though ext4_alloc_file_blocks() is only currently used by extent base inodes we will avoid recalculating number of credits unnecessarily in the case of indirect based inodes. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
0 files changed, 0 insertions, 0 deletions