LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] f2fs: clear page_error for all the writebacking pages
@ 2018-04-23 22:49 Jaegeuk Kim
  2018-04-24  9:25 ` Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2018-04-23 22:49 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

This patch clear page_error bit, if the page is going to be writebacked.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/gc.c      | 1 +
 fs/f2fs/inline.c  | 1 +
 fs/f2fs/node.c    | 1 +
 fs/f2fs/segment.c | 1 +
 4 files changed, 4 insertions(+)

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 b50e36351280..1eaa2049eafa 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 3325b9959119..a99c30b4eec9 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -2758,6 +2758,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);
-- 
2.17.0.484.g0c8726318c-goog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] f2fs: clear page_error for all the writebacking pages
  2018-04-23 22:49 [PATCH] f2fs: clear page_error for all the writebacking pages Jaegeuk Kim
@ 2018-04-24  9:25 ` Chao Yu
  2018-04-26 15:16   ` Jaegeuk Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2018-04-24  9:25 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel

Hi Jaegeuk,

On 2018/4/24 6:49, Jaegeuk Kim wrote:
> This patch clear page_error bit, if the page is going to be writebacked.

This patch is similar to previous patch ("f2fs: clear PageError on writepage"),
only coverage is different, could you merge them?

Thanks,

> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/gc.c      | 1 +
>  fs/f2fs/inline.c  | 1 +
>  fs/f2fs/node.c    | 1 +
>  fs/f2fs/segment.c | 1 +
>  4 files changed, 4 insertions(+)
> 
> 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 b50e36351280..1eaa2049eafa 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 3325b9959119..a99c30b4eec9 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -2758,6 +2758,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);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] f2fs: clear page_error for all the writebacking pages
  2018-04-24  9:25 ` Chao Yu
@ 2018-04-26 15:16   ` Jaegeuk Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Jaegeuk Kim @ 2018-04-26 15:16 UTC (permalink / raw)
  To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel

On 04/24, Chao Yu wrote:
> Hi Jaegeuk,
> 
> On 2018/4/24 6:49, Jaegeuk Kim wrote:
> > This patch clear page_error bit, if the page is going to be writebacked.
> 
> This patch is similar to previous patch ("f2fs: clear PageError on writepage"),
> only coverage is different, could you merge them?

Yeah, done.

> 
> Thanks,
> 
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >  fs/f2fs/gc.c      | 1 +
> >  fs/f2fs/inline.c  | 1 +
> >  fs/f2fs/node.c    | 1 +
> >  fs/f2fs/segment.c | 1 +
> >  4 files changed, 4 insertions(+)
> > 
> > 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 b50e36351280..1eaa2049eafa 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 3325b9959119..a99c30b4eec9 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -2758,6 +2758,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);
> > 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-26 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 22:49 [PATCH] f2fs: clear page_error for all the writebacking pages Jaegeuk Kim
2018-04-24  9:25 ` Chao Yu
2018-04-26 15:16   ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).