[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1009271113210.2743@dhcp-lab-213.englab.brq.redhat.com>
Date: Mon, 27 Sep 2010 11:20:57 +0200 (CEST)
From: Lukas Czerner <lczerner@...hat.com>
To: Andreas Dilger <adilger.kernel@...ger.ca>
cc: Lukas Czerner <lczerner@...hat.com>, linux-ext4@...r.kernel.org,
tytso@....edu, rwheeler@...hat.com, sandeen@...hat.com,
snitzer@...il.com
Subject: Re: [PATCH 1/3] Add ioctl FITRIM.
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists