Re: [PATCH] xfsprogs: add fpunch command for hole punching via fallocate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 

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


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux