linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ubifs: switch_gc_head: remove redondant sync of wbuf
@ 2016-06-23  5:53 Sylvain Etienne
  2016-06-23  7:47 ` Richard Weinberger
  2016-06-27 10:50 ` Artem Bityutskiy
  0 siblings, 2 replies; 4+ messages in thread
From: Sylvain Etienne @ 2016-06-23  5:53 UTC (permalink / raw)
  To: linux-mtd; +Cc: Richard Weinberger, Artem Bityutskiy

The wbuf is already sync-ed before ubifs_leb_unmap()

Signed-off-by: Sylvain Etienne <seti@dadboo.eu>
---

Notes:
    This is my first patch on this mailing list. Please let me know if I missed
    something.

 fs/ubifs/gc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
index 9718da8..821b348 100644
--- a/fs/ubifs/gc.c
+++ b/fs/ubifs/gc.c
@@ -100,10 +100,6 @@ static int switch_gc_head(struct ubifs_info *c)
 	if (err)
 		return err;
 
-	err = ubifs_wbuf_sync_nolock(wbuf);
-	if (err)
-		return err;
-
 	err = ubifs_add_bud_to_log(c, GCHD, gc_lnum, 0);
 	if (err)
 		return err;
-- 
2.7.4

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

* Re: [PATCH] ubifs: switch_gc_head: remove redondant sync of wbuf
  2016-06-23  5:53 [PATCH] ubifs: switch_gc_head: remove redondant sync of wbuf Sylvain Etienne
@ 2016-06-23  7:47 ` Richard Weinberger
  2016-06-23  7:49   ` Boris Brezillon
  2016-06-27 10:50 ` Artem Bityutskiy
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2016-06-23  7:47 UTC (permalink / raw)
  To: Sylvain Etienne, linux-mtd, Boris Brezillon, Artem Bityutskiy

Am 23.06.2016 um 07:53 schrieb Sylvain Etienne:
> The wbuf is already sync-ed before ubifs_leb_unmap()
> 
> Signed-off-by: Sylvain Etienne <seti@dadboo.eu>
> ---
> 
> Notes:
>     This is my first patch on this mailing list. Please let me know if I missed
>     something.
> 
>  fs/ubifs/gc.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
> index 9718da8..821b348 100644
> --- a/fs/ubifs/gc.c
> +++ b/fs/ubifs/gc.c
> @@ -100,10 +100,6 @@ static int switch_gc_head(struct ubifs_info *c)
>  	if (err)
>  		return err;
>  
> -	err = ubifs_wbuf_sync_nolock(wbuf);
> -	if (err)
> -		return err;
> -
>  	err = ubifs_add_bud_to_log(c, GCHD, gc_lnum, 0);
>  	if (err)
>  		return err;

This call was introduced by:
commit cb14a18465686ea6add51b1008865b8174c28bd7
Author: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Date:   Sun May 15 14:51:54 2011 +0300

    UBIFS: synchronize write-buffer before switching to the next bud


Which basically syncs the wbuf before each ubifs_add_bud_to_log().
In switch_gc_head() we synced already before ubifs_leb_unmap().
So either the said commit oversaw that sync call or I miss something.

But AFACT your change is correct. Artem, can you please confirm?
Boris, didn't discuss that redundancy while inspecting UBIFS wrt. MLC
support?

Thanks,
//richard

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

* Re: [PATCH] ubifs: switch_gc_head: remove redondant sync of wbuf
  2016-06-23  7:47 ` Richard Weinberger
@ 2016-06-23  7:49   ` Boris Brezillon
  0 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2016-06-23  7:49 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Sylvain Etienne, linux-mtd, Artem Bityutskiy

On Thu, 23 Jun 2016 09:47:15 +0200
Richard Weinberger <richard@nod.at> wrote:

> Am 23.06.2016 um 07:53 schrieb Sylvain Etienne:
> > The wbuf is already sync-ed before ubifs_leb_unmap()
> > 
> > Signed-off-by: Sylvain Etienne <seti@dadboo.eu>
> > ---
> > 
> > Notes:
> >     This is my first patch on this mailing list. Please let me know if I missed
> >     something.
> > 
> >  fs/ubifs/gc.c | 4 ----
> >  1 file changed, 4 deletions(-)
> > 
> > diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
> > index 9718da8..821b348 100644
> > --- a/fs/ubifs/gc.c
> > +++ b/fs/ubifs/gc.c
> > @@ -100,10 +100,6 @@ static int switch_gc_head(struct ubifs_info *c)
> >  	if (err)
> >  		return err;
> >  
> > -	err = ubifs_wbuf_sync_nolock(wbuf);
> > -	if (err)
> > -		return err;
> > -
> >  	err = ubifs_add_bud_to_log(c, GCHD, gc_lnum, 0);
> >  	if (err)
> >  		return err;  
> 
> This call was introduced by:
> commit cb14a18465686ea6add51b1008865b8174c28bd7
> Author: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Date:   Sun May 15 14:51:54 2011 +0300
> 
>     UBIFS: synchronize write-buffer before switching to the next bud
> 
> 
> Which basically syncs the wbuf before each ubifs_add_bud_to_log().
> In switch_gc_head() we synced already before ubifs_leb_unmap().
> So either the said commit oversaw that sync call or I miss something.
> 
> But AFACT your change is correct. Artem, can you please confirm?
> Boris, didn't discuss that redundancy while inspecting UBIFS wrt. MLC
> support?

Yes, I remember proposing the same patch (though I never posted it on
the ML). It seems to be useless, but let's wait for Artem's
confirmation.

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

* Re: [PATCH] ubifs: switch_gc_head: remove redondant sync of wbuf
  2016-06-23  5:53 [PATCH] ubifs: switch_gc_head: remove redondant sync of wbuf Sylvain Etienne
  2016-06-23  7:47 ` Richard Weinberger
@ 2016-06-27 10:50 ` Artem Bityutskiy
  1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2016-06-27 10:50 UTC (permalink / raw)
  To: Sylvain Etienne, linux-mtd; +Cc: Richard Weinberger

On Thu, 2016-06-23 at 07:53 +0200, Sylvain Etienne wrote:
> The wbuf is already sync-ed before ubifs_leb_unmap()
> 
> Signed-off-by: Sylvain Etienne <seti@dadboo.eu>

Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

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

end of thread, other threads:[~2016-06-27 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23  5:53 [PATCH] ubifs: switch_gc_head: remove redondant sync of wbuf Sylvain Etienne
2016-06-23  7:47 ` Richard Weinberger
2016-06-23  7:49   ` Boris Brezillon
2016-06-27 10:50 ` Artem Bityutskiy

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).