summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2016-06-26 22:24:01 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2016-06-26 22:24:01 (GMT)
commitd08854f5bcf3ea0cabc6fd2fc49c2d97e00c7c88 (patch)
tree50365a520f03df76963fb61fc12be9689a718d58 /fs/ext4/ext4.h
parent1a695a905c18548062509178b98bc91e67510864 (diff)
downloadlinux-d08854f5bcf3ea0cabc6fd2fc49c2d97e00c7c88.tar.xz
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>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index b84aa1c..96c73e6 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1430,6 +1430,7 @@ struct ext4_sb_info {
unsigned short *s_mb_offsets;
unsigned int *s_mb_maxs;
unsigned int s_group_info_size;
+ unsigned int s_mb_free_pending;
/* tunables */
unsigned long s_stripe;