[illumos-Developer] Now with zfs-ops-in-an-ioctl: iSCSI UNMAP (1st draft)

George Wilson gwilson at zfsmail.com
Thu Feb 17 05:28:04 PST 2011


On 2/16/11 2:06 PM, Dan McDonald wrote:
> 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...


Using zvol_ioctl() is the best choice for this type of action. It will 
give you the control you want and avoid having to mess with the 
zfs_cmd_t stuff.

- George

>> 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
>
> _______________________________________________
> Developer mailing list
> Developer at lists.illumos.org
> http://lists.illumos.org/m/listinfo/developer




More information about the Developer mailing list