[PATCH] util-linux/fallocate: introduce an option -c to support FALLOC_FL_COLLAPSE_RANGE
Namjae Jeon
linkinjeon at gmail.com
Wed Feb 26 21:59:51 CST 2014
Hi Dongsu.
> As discussed in the thread "[PATCH RESEND 3/10] ext4: Add support
> FALLOC_FL_COLLAPSE_RANGE for fallocate", [3] this patch to util-linux
> will be useful for testing collapse-range inside xfstests.
As Dave pointed, this patch is needed for fsstress not xfstests.
>
> [1] https://lkml.org/lkml/2014/2/18/374
> [2] https://lkml.org/lkml/2014/2/20/318
> [3] https://lkml.org/lkml/2014/2/18/83
>
> @@ -51,6 +52,10 @@
> # define FALLOC_FL_PUNCH_HOLE 2
> #endif
>
> +#ifndef FALLOC_FL_COLLAPSE_RANGE
> +# define FALLOC_FL_COLLAPSE_RANGE 8
> +#endif
> +
> #include "nls.h"
> #include "strutils.h"
> #include "c.h"
> @@ -66,12 +71,13 @@ static void __attribute__((__noreturn__)) usage(FILE
> *out)
> fprintf(out,
> _(" %s [options] <filename>\n"), program_invocation_short_name);
> fputs(USAGE_OPTIONS, out);
> - fputs(_(" -d, --dig-holes detect and dig holes\n"), out);
> - fputs(_(" -l, --length <num> length of the (de)allocation, in bytes\n"),
> out);
> - fputs(_(" -n, --keep-size don't modify the length of the file\n"),
> out);
> - fputs(_(" -o, --offset <num> offset of the (de)allocation, in bytes\n"),
> out);
> - fputs(_(" -p, --punch-hole punch holes in the file\n"), out);
> - fputs(_(" -v, --verbose verbose mode\n"), out);
> + fputs(_(" -c, --collapse-range collapse a hole in the file\n"), out);
I think that it is better to change like this => "collapse space in the file"
And I add util-liunx's maintainer in this mail loop.
Thanks.
More information about the xfs
mailing list