diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-18 21:07:56 (GMT) |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-20 18:46:15 (GMT) |
commit | 38f91ca8c0ea69f707c26f592dcc70f937088bcc (patch) | |
tree | 746c2c5769a93e49649b6d0b3a988c3c28c3319c /fs/f2fs/checkpoint.c | |
parent | 975756c41332bc5e523e9f843271ed5ab6aaaaaa (diff) | |
download | linux-38f91ca8c0ea69f707c26f592dcc70f937088bcc.tar.xz |
f2fs: flush pending bios right away when error occurs
Given errors, this patch flushes pending bios as soon as possible.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index cf79598..3891600 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -26,6 +26,14 @@ static struct kmem_cache *ino_entry_slab; struct kmem_cache *inode_entry_slab; +void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io) +{ + set_ckpt_flags(sbi->ckpt, CP_ERROR_FLAG); + sbi->sb->s_flags |= MS_RDONLY; + if (!end_io) + f2fs_flush_merged_bios(sbi); +} + /* * We guarantee no failure on the returned page. */ @@ -91,7 +99,7 @@ repeat: * meta page. */ if (unlikely(!PageUptodate(page))) - f2fs_stop_checkpoint(sbi); + f2fs_stop_checkpoint(sbi, false); out: return page; } |