ext4: optimize ext4_should_retry_alloc() to improve ENOSPC performance
commitd08854f5bcf3ea0cabc6fd2fc49c2d97e00c7c88
authorTheodore Ts'o <tytso@mit.edu>
Sun, 26 Jun 2016 22:24:01 +0000 (26 18:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 26 Jun 2016 22:24:01 +0000 (26 18:24 -0400)
tree50365a520f03df76963fb61fc12be9689a718d58
parent1a695a905c18548062509178b98bc91e67510864
ext4: optimize ext4_should_retry_alloc() to improve ENOSPC performance

If there are no pending blocks to be released after a commit, forcing
a journal commit has no hope of helping.  It's possible that a commit
had just completed, so if there are now free blocks available for
allocation, it's worth retrying the commit.

Reported-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/balloc.c
fs/ext4/ext4.h
fs/ext4/ext4_jbd2.h
fs/ext4/mballoc.c