diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-10-07 18:46:37 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-10-12 22:37:54 +0200 |
commit | c912a8298c16ef15aa2b7203022c935f439f488b (patch) | |
tree | 728add7743e88aaea7571acbf3e3699b4b8921ee /fs/f2fs/file.c | |
parent | f2fs: merge meta writes as many possible (diff) | |
download | linux-c912a8298c16ef15aa2b7203022c935f439f488b.tar.xz linux-c912a8298c16ef15aa2b7203022c935f439f488b.zip |
f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure
This patch introduces F2FS_GOING_DOWN_METAFLUSH which flushes meta pages like
SSA blocks and then blocks all the writes.
This can be used by power-failure tests.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index b3985a680521..6d3cfd55c3e4 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1498,6 +1498,10 @@ static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg) case F2FS_GOING_DOWN_NOSYNC: f2fs_stop_checkpoint(sbi); break; + case F2FS_GOING_DOWN_METAFLUSH: + sync_meta_pages(sbi, META, LONG_MAX); + f2fs_stop_checkpoint(sbi); + break; default: return -EINVAL; } |