Skip to content

Commit

Permalink
f2fs: clear PageError on writepage - part 2
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jaegeuk Kim committed Apr 26, 2018
1 parent dae6d19 commit 61ff769
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/f2fs/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions fs/f2fs/inline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
fio.op_flags |= WRITE_FLUSH_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));
Expand Down
1 change: 1 addition & 0 deletions fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -2840,6 +2840,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);
Expand Down

0 comments on commit 61ff769

Please sign in to comment.