[PATCH] xfsprogs: add fpunch command for hole punching via fallocate
Josef Bacik
josef at redhat.com
Tue Jan 18 07:06:03 CST 2011
On Tue, Jan 18, 2011 at 07:51:12AM -0500, Christoph Hellwig wrote:
> Looks mostly good, but I wonder what the point of a new command for this
> is. It's just one new flag to fallocate, so I'd also implement it as
> a flag to the fallocate command.
>
:( thats what I did to begin with, and Dave said he'd rather have a seperate
command.
> > @@ -153,8 +156,10 @@ fallocate_f(
> > xfs_flock64_t segment;
> > int mode = 0;
> > int c;
> > + const char *opts;
> >
> > - while ((c = getopt(argc, argv, "k")) != EOF) {
> > + opts = "k";
> > + while ((c = getopt(argc, argv, opts)) != EOF) {
> > switch (c) {
> > case 'k':
> > mode = FALLOC_FL_KEEP_SIZE;
>
> Why do you change unrelated code?
>
Crap sorry this is left over from my original patch.
> > +#if defined (FALLOC_FL_PUNCH_HOLE)
>
> I'd rather have a
>
> #ifndef FALLOC_FL_PUNCH_HOLE
> #define FALLOC_FL_PUNCH_HOLE 0x02
> #endif
>
> to avoid requiring newest kernel headers.
>
Sounds good. So which do we want, a new command or a new flag? Thanks,
Josef
More information about the xfs
mailing list