diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-04-12 09:09:04 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-03 00:30:58 +0300 |
commit | 17c500350b3e1a1430cbcc7efb54eb859446fc8a (patch) | |
tree | 976a2d1090bed05d84929b3e81fc989c23798104 /fs/f2fs | |
parent | a90a0884ac75f825157470a1c17e707d487bceb6 (diff) | |
download | linux-17c500350b3e1a1430cbcc7efb54eb859446fc8a.tar.xz |
f2fs: clear PageError on writepage
This patch clears PageError in some pages tagged by read path, but when we
write the pages with valid contents, writepage should clear the bit likewise
ext4.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 2 | ||||
-rw-r--r-- | fs/f2fs/gc.c | 1 | ||||
-rw-r--r-- | fs/f2fs/inline.c | 1 | ||||
-rw-r--r-- | fs/f2fs/node.c | 1 | ||||
-rw-r--r-- | fs/f2fs/segment.c | 1 |
5 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 0f652b05decc..5477fc09c3cd 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1735,6 +1735,7 @@ got_it: goto out_writepage; set_page_writeback(page); + ClearPageError(page); f2fs_put_dnode(&dn); if (fio->need_lock == LOCK_REQ) f2fs_unlock_op(fio->sbi); @@ -1757,6 +1758,7 @@ got_it: goto out_writepage; set_page_writeback(page); + ClearPageError(page); /* LFS mode write path */ write_data_page(&dn, fio); diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 70418b34c5f6..a7de8b3431a9 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -693,6 +693,7 @@ static void move_data_block(struct inode *inode, block_t bidx, dec_page_count(fio.sbi, F2FS_DIRTY_META); set_page_writeback(fio.encrypted_page); + ClearPageError(page); /* allocate block address */ f2fs_wait_on_page_writeback(dn.node_page, NODE, true); diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 767e41d944c6..bc571942885e 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -139,6 +139,7 @@ int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page) /* write data page to try to make data consistent */ set_page_writeback(page); + ClearPageError(page); fio.old_blkaddr = dn->data_blkaddr; set_inode_flag(dn->inode, FI_HOT_DATA); write_data_page(dn, &fio); diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index ae83ca9d2d31..3a3d38b3e9ec 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1394,6 +1394,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, fio.op_flags |= REQ_PREFLUSH | REQ_FUA; set_page_writeback(page); + ClearPageError(page); fio.old_blkaddr = ni.blk_addr; write_node_page(nid, &fio); set_node_addr(sbi, &ni, fio.new_blkaddr, is_fsync_dnode(page)); diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 5854cc4e1d67..1e365e913858 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -2757,6 +2757,7 @@ void write_meta_page(struct f2fs_sb_info *sbi, struct page *page, fio.op_flags &= ~REQ_META; set_page_writeback(page); + ClearPageError(page); f2fs_submit_page_write(&fio); f2fs_update_iostat(sbi, io_type, F2FS_BLKSIZE); |