public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Namjae Jeon <namjae.jeon@samsung.com>
To: "'Lukáš Czerner'" <lczerner@redhat.com>
Cc: linux-fsdevel@vger.kernel.org,
	'Ashish Sangwan' <a.sangwan@samsung.com>,
	xfs@oss.sgi.com
Subject: RE: [PATCH] xfstests: fsstress: fix incorrect if condition check for collapse range mode
Date: Wed, 30 Apr 2014 19:43:45 +0900	[thread overview]
Message-ID: <004701cf6461$0fdab330$2f901990$@samsung.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1404301223160.2100@localhost.localdomain>

> On Wed, 30 Apr 2014, Namjae Jeon wrote:
> 
> > Date: Wed, 30 Apr 2014 19:11:32 +0900
> > From: Namjae Jeon <namjae.jeon@samsung.com>
> > To: Dave Chinner <david@fromorbit.com>
> > Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org,
> >     Ashish Sangwan <a.sangwan@samsung.com>
> > Subject: [PATCH] xfstests: fsstress: fix incorrect if condition check for
> >     collapse range mode
> >
> > There is if condition to be block aligned for off and len of Collapse range.
> > But off and len for all fallocate opearion can be aligned by incorrect
> > if condition check.
> >
> > Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> > Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
> > ---
> >  ltp/fsstress.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> > index 29fc250..ff9ed12 100644
> > --- a/ltp/fsstress.c
> > +++ b/ltp/fsstress.c
> > @@ -2230,7 +2230,7 @@ do_fallocate(int opno, long r, int mode)
> >  	 * Collapse range requires off and len to be block aligned, make it
> >  	 * more likely to be the case.
> >  	 */
> > -	if (FALLOC_FL_COLLAPSE_RANGE && (opno % 2)) {
> > +	if (mode & FALLOC_FL_COLLAPSE_RANGE && (opno % 2)) {
> >  		off = ((off + stb.st_blksize - 1) & ~(stb.st_blksize - 1));
> >  		len = ((len + stb.st_blksize - 1) & ~(stb.st_blksize - 1));
> >  	}
> 
> oops :). Thanks for fixing it. Even though it would be better to use
> parentheses
Hi Lukas.
Okay, I will send v2 patch.
Thanks for review!
> 
> +	if ((mode & FALLOC_FL_COLLAPSE_RANGE) && (opno % 2)) {
> 
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      parent reply	other threads:[~2014-04-30 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 10:11 [PATCH] xfstests: fsstress: fix incorrect if condition check for collapse range mode Namjae Jeon
2014-04-30 10:26 ` Lukáš Czerner
2014-04-30 10:33   ` Namjae Jeon
2014-04-30 10:43   ` Namjae Jeon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004701cf6461$0fdab330$2f901990$@samsung.com' \
    --to=namjae.jeon@samsung.com \
    --cc=a.sangwan@samsung.com \
    --cc=lczerner@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox