Re: [PATCH 1/3] Add ioctl FITRIM.

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

 



On Fri, 24 Sep 2010, Andreas Dilger wrote:

> On 2010-09-24, at 09:35, Lukas Czerner wrote:
> > array[0] - (start) first Byte to trim
> > array[1] - (len) number of Bytes to trim from start
> > array[2] - (minlen) minimum extent length to trim, free extents shorter
> > 
> > than this number of Bytes will be ignored. This number will be rounded
> > up to the block size.
> > 
> > It is also possible to specify NULL as an argument. In this case the
> > arguments will set itself as follows:
> > 
> > args[0] = 0;
> > args[1] = ULLONG_MAX;
> > args[2] = 0;
> 
> (minor) you use "array[]" in one place and "args[]" in another.
> 
> > +#define FITRIM		_IOWR('X', 121, uint64_t)	/* Trim */
> 
> This ioctl definition isn't strictly correct.  The "size" parameter is actually uint64_t[3], though I'm not sure whether you need to define a structure in order to specify this.

You,re probably right. A structure would be better. But for example
BLKDISCARD takes takes uint64_t[2] and its definition looks like:

#define BLKDISCARD _IO(0x12,119)

which confuses me a bit.

> 
> Cheers, Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux