xfs
[Top] [All Lists]

Re: [PATCH RESEND 11/12] xfstests: fsx: Add fallocate insert range opera

To: Namjae Jeon <linkinjeon@xxxxxxxxx>
Subject: Re: [PATCH RESEND 11/12] xfstests: fsx: Add fallocate insert range operation
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 17 Feb 2015 12:00:33 +1100
Cc: tytso@xxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, a.sangwan@xxxxxxxxxxx, bfoster@xxxxxxxxxx, mtk.manpages@xxxxxxxxx, linux-man@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, Namjae Jeon <namjae.jeon@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1424101680-3301-12-git-send-email-linkinjeon@xxxxxxxxx>
References: <1424101680-3301-1-git-send-email-linkinjeon@xxxxxxxxx> <1424101680-3301-12-git-send-email-linkinjeon@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Feb 17, 2015 at 12:47:58AM +0900, Namjae Jeon wrote:
> From: Namjae Jeon <namjae.jeon@xxxxxxxxxxx>
> 
> This commit adds fallocate FALLOC_FL_INSERT_RANGE support for fsx.
> 
> Signed-off-by: Namjae Jeon <namjae.jeon@xxxxxxxxxxx>
> Signed-off-by: Ashish Sangwan <a.sangwan@xxxxxxxxxxx>
> Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
> ---
>  ltp/fsx.c |  124 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 114 insertions(+), 10 deletions(-)
.....
> @@ -339,6 +341,14 @@ logdump(void)
>                                                    lp->args[0] + lp->args[1])
>                               prt("\t******CCCC");
>                       break;
> +             case OP_INSERT_RANGE:
> +                     prt("INSERT 0x%x thru 0x%x\t(0x%x bytes)",
> +                         lp->args[0], lp->args[0] + lp->args[1] - 1,
> +                         lp->args[1]);
> +                     if (badoff >= lp->args[0] && badoff <
> +                                                  lp->args[0] + lp->args[1])
> +                             prt("\t******CCCC");

Probably should output "*****IIII" so we can distinguish it from
collapse operations easily.

> @@ -1307,6 +1403,9 @@ usage(void)
>  #ifdef FALLOC_FL_COLLAPSE_RANGE
>  "    -C: Do not use collapse range calls\n"
>  #endif
> +#ifdef FALLOC_FL_INSERT_RANGE
> +"    -i: Do not use insert range calls\n"
> +#endif

I'd make that "-I" rather than "-i" so it matches with the "-C" of
collapse range.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>