Hi,
> -----Original Message-----
> From: Jaegeuk Kim [mailto:[email protected]]
> Sent: Tuesday, March 18, 2014 8:33 AM
> To: Chao Yu
> Cc: [email protected]; [email protected];
> [email protected]
> Subject: Re: [f2fs-dev] [PATCH] f2fs: fix incorrect parsing with option string
>
> Hi,
>
> 2014-03-17 (월), 17:40 +0800, Chao Yu:
> > Previously 'background_gc={on***,off***}' is being parsed as correct option,
> > with this patch we cloud fix the trivial bug in mount process.
> >
> > Signed-off-by: Chao Yu <[email protected]>
> > ---
> > fs/f2fs/super.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > index 057a3ef..6597290 100644
> > --- a/fs/f2fs/super.c
> > +++ b/fs/f2fs/super.c
> > @@ -258,9 +258,9 @@ static int parse_options(struct super_block *sb, char
> > *options)
> >
> > if (!name)
> > return -ENOMEM;
> > - if (!strncmp(name, "on", 2))
> > + if (!strncmp(name, "on", strlen(name)))
>
> What about 'background_gc=o'?
> Need to check strlen(name) == 2...
Oh, you're right. I will fix it and send v2 patch.
Thanks for your review. :)
> Thanks,
>
> > set_opt(sbi, BG_GC);
> > - else if (!strncmp(name, "off", 3))
> > + else if (!strncmp(name, "off", strlen(name)))
> > clear_opt(sbi, BG_GC);
> > else {
> > kfree(name);
>
> --
> Jaegeuk Kim
> Samsung
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel