diff options
author | Jan Kara <jack@suse.cz> | 2020-05-25 10:12:15 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-06-03 23:16:56 -0400 |
commit | 6b8ed62008a49751fc71fefd2a4f89202a7c2d4d (patch) | |
tree | b951c494c7e143086200904852bc48edae3c3140 /fs/nilfs2 | |
parent | 6e014c621e7271649f0d51e54dbe1db4c10486c8 (diff) | |
download | linux-stable-6b8ed62008a49751fc71fefd2a4f89202a7c2d4d.tar.gz linux-stable-6b8ed62008a49751fc71fefd2a4f89202a7c2d4d.tar.bz2 linux-stable-6b8ed62008a49751fc71fefd2a4f89202a7c2d4d.zip |
ext4: avoid unnecessary transaction starts during writeback
ext4_writepages() currently works in a loop like:
start a transaction
scan inode for pages to write
map and submit these pages
stop the transaction
This loop results in starting transaction once more than is needed
because in the last iteration we start a transaction only to scan the
inode and find there are no pages to write. This can be significant
increase in number of transaction starts for single-extent files or
files that have all blocks already mapped. Furthermore we already know
from previous iteration whether there are more pages to write or not. So
propagate the information from mpage_prepare_extent_to_map() and avoid
unnecessary looping in case there are no more pages to write.
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200525081215.29451-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/nilfs2')
0 files changed, 0 insertions, 0 deletions