[illumos-Developer] Now with zfs-ops-in-an-ioctl: iSCSI UNMAP (1st draft)
Dan McDonald
danmcd at nexenta.com
Wed Feb 16 14:06:21 PST 2011
On Wed, Feb 16, 2011 at 04:50:17PM -0500, Eric Schrock wrote:
> > The original code:
> >
> > http://10.1.1.13/~danmcd/webrevs/unmap-post-rich/
> >
> > Had direct zvol manipulations to which Eric Schrock objected strongly.
> >
>
> You'd still be doing an ioctl(), just to the zvol, instead of /dev/zfs. So
> the code would have all the properties we both desire (localizing zvol code,
> going through a standard interface that can be leveraged elsewhere, etc).
So I should patch zvol.c:zvol_ioctl() instead. That makes sense...
> My idea was to literally use F_FREESP and just make it work on zvols. It's
> a little weird, but semantically identical. That way, you just issue the
> same ioctl(), and it would work for files as well (making them sparse in the
> process).
F_FREESP would be a very good answer IMHO. Matt?!?
> If there really needs to be a different ioctl(), it should still be done on
> the zvol itself (as Matt points out). Just invent whatever ioctl() you need
> (maybe a DKIOC variant?), but it would be good to understand why the
> existing one is insufficent/inappropriate.
I'd like to hear Matt's opinion on this, but I'll refactor using F_FREESP for
now. Stay tuned...
Thanks,
Dan
More information about the Developer
mailing list