Re: [f2fs-dev] [PATCH] f2fs: retry to revoke atomic commit in -ENOMEM case

2017-08-10 Thread Jaegeuk Kim
On 08/11, Chao Yu wrote:
> Ping,

Sorry, merged. ;)

> 
> On 2017/8/8 19:09, Chao Yu wrote:
> > During atomic committing, if we encounter -ENOMEM in revoke path, it's
> > better to give a chance to retry revoking.
> > 
> > Signed-off-by: Chao Yu 
> > ---
> >  fs/f2fs/segment.c | 10 --
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 45fb53411032..682ae68b9ef7 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -213,9 +213,15 @@ static int __revoke_inmem_pages(struct inode *inode,
> > struct node_info ni;
> >  
> > trace_f2fs_commit_inmem_page(page, INMEM_REVOKE);
> > -
> > +retry:
> > set_new_dnode(, inode, NULL, NULL, 0);
> > -   if (get_dnode_of_data(, page->index, LOOKUP_NODE)) {
> > +   err = get_dnode_of_data(, page->index, LOOKUP_NODE);
> > +   if (err) {
> > +   if (err == -ENOMEM) {
> > +   congestion_wait(BLK_RW_ASYNC, HZ/50);
> > +   cond_resched();
> > +   goto retry;
> > +   }
> > err = -EAGAIN;
> > goto next;
> > }
> > 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


Re: [f2fs-dev] [PATCH] f2fs: retry to revoke atomic commit in -ENOMEM case

2017-08-10 Thread Chao Yu
Ping,

On 2017/8/8 19:09, Chao Yu wrote:
> During atomic committing, if we encounter -ENOMEM in revoke path, it's
> better to give a chance to retry revoking.
> 
> Signed-off-by: Chao Yu 
> ---
>  fs/f2fs/segment.c | 10 --
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 45fb53411032..682ae68b9ef7 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -213,9 +213,15 @@ static int __revoke_inmem_pages(struct inode *inode,
>   struct node_info ni;
>  
>   trace_f2fs_commit_inmem_page(page, INMEM_REVOKE);
> -
> +retry:
>   set_new_dnode(, inode, NULL, NULL, 0);
> - if (get_dnode_of_data(, page->index, LOOKUP_NODE)) {
> + err = get_dnode_of_data(, page->index, LOOKUP_NODE);
> + if (err) {
> + if (err == -ENOMEM) {
> + congestion_wait(BLK_RW_ASYNC, HZ/50);
> + cond_resched();
> + goto retry;
> + }
>   err = -EAGAIN;
>   goto next;
>   }
> 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel