summaryrefslogtreecommitdiff
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 13:43:05 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 16:37:16 +0900
commitd3baf95da5b0bce9fe980eeff6140817d63fabdf (patch)
treebdfe9bf428f9c21959b05136b61bd440df2b86a5 /fs/f2fs/checkpoint.c
parent87d6f890944d092c4ef5b84053f0d0d5d8137b0b (diff)
f2fs: increase pages_skipped when skipping writepages
This patch increases pages_skipped when skipping writepages. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 1f52b70ff9d1..aef32f36e2f3 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -190,12 +190,9 @@ static int f2fs_write_meta_pages(struct address_space *mapping,
int nrpages = nr_pages_to_skip(sbi, META);
long written;
- if (wbc->for_kupdate)
- return 0;
-
/* collect a number of dirty meta pages and write together */
- if (get_pages(sbi, F2FS_DIRTY_META) < nrpages)
- return 0;
+ if (wbc->for_kupdate || get_pages(sbi, F2FS_DIRTY_META) < nrpages)
+ goto skip_write;
/* if mounting is failed, skip writing node pages */
mutex_lock(&sbi->cp_mutex);
@@ -203,6 +200,10 @@ static int f2fs_write_meta_pages(struct address_space *mapping,
mutex_unlock(&sbi->cp_mutex);
wbc->nr_to_write -= written;
return 0;
+
+skip_write:
+ wbc->pages_skipped += get_pages(sbi, F2FS_DIRTY_META);
+ return 0;
}
long sync_meta_pages(struct f2fs_sb_info *sbi, enum page_type type,