diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-06-29 23:20:45 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-07-07 10:34:44 -0700 |
commit | 0771fcc71c0c28bf31ac5c2c863b9f0de0fdf00d (patch) | |
tree | 249a29fd536d6bc646e51f99b77340add6eb898b /fs/f2fs/checkpoint.c | |
parent | 6915ea9d8dd8690570fe4a9864b898447a4f3da0 (diff) | |
download | lwn-0771fcc71c0c28bf31ac5c2c863b9f0de0fdf00d.tar.gz lwn-0771fcc71c0c28bf31ac5c2c863b9f0de0fdf00d.zip |
f2fs: skip ->writepages for {mete,node}_inode during recovery
Skip ->writepages in prior to ->writepage for {meta,node}_inode during
recovery, hence unneeded loop in ->writepages can be avoided.
Moreover, check SBI_POR_DOING earlier while writebacking pages.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 12559a4b6c24..954917d582f8 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -269,6 +269,9 @@ static int f2fs_write_meta_pages(struct address_space *mapping, struct f2fs_sb_info *sbi = F2FS_M_SB(mapping); long diff, written; + if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING))) + goto skip_write; + /* collect a number of dirty meta pages and write together */ if (wbc->for_kupdate || get_pages(sbi, F2FS_DIRTY_META) < nr_pages_to_skip(sbi, META)) |