[illumos-Developer] NOW with zvol-only zfs diffs --> iSCSI UNMAP

Garrett D'Amore garrett at nexenta.com
Sat Feb 19 14:58:17 PST 2011


I noticed the fcntl() usage myself, and thought it was a bit strange.

I would like to make sure that if we choose an ioctl, it will work with
ordinary SCSI unmap (initiated from ZFS for example) as well -- then it
should be a fairly straight-forward matter to extend this in sd and
SCSA.

	- Garrett

On Sat, 2011-02-19 at 09:40 -0500, Eric Schrock wrote:
> I looked into F_FREESP a little more, and unfortunately it's not as
> universal as I had hoped.  This is really an argument to fcntl(),
> which itself gets translated to VOP_SPACE() under the hood (after
> checking that the file type is VREG).  So the idea of using the same
> ioctl() for both regular files and devices is bogus.  Rather than
> trying to shoehorn it in, I would create DKIOCFREE that has the
> semantics we want (start and end of range, I would guess.
> 
> 
> The lack of credential checks in zvol_ioctl() seems a little dubious
> to me as well.  My guess is that these checks are enforced at the
> dev/ldi layer, as we also don't have any credential checks in
> zvol_write(), for example.  I'd verify that one needs to have the
> device open for writing in order to issue an ioctl().
> 
> 
> Thanks for working on this, it's looking much better.
> 
> 
> - Eric
> 
> On Thu, Feb 17, 2011 at 3:02 PM, Dan McDonald <danmcd at nexenta.com>
> wrote:
>         Thanks to ZFSers for being patient.
>         
>         I've taken the following suggestions:
>         
>                - Make F_FREESP an ioctl for zvols only.
>         
>                - Only modify zvol.c
>         
>                - And don't even bother with the txg_wait_sync() call,
>         as it might
>                  take O(minutes) to complete.
>         
>         and updated the webrev:
>         
>                http://www.kebe.com/~danmcd/webrevs/unmap/
>         
>         to what should be an improvement.  I still have KEBE comments
>         in there which
>         need to be addressed and removed, so please when you see any,
>         chime in with
>         your $0.02 for answers.
>         
>         Thanks,
>         Dan
>         
>         p.s. There's rudimentary WRITE SAME support, but it's just at
>         this point a
>             front-end to UNMAP.  The real WRITE SAME changes are
>         in-house right now,
>             but I hope to have 'em out to here AFTER I push these
>         UNMAP changes.
>         
>         _______________________________________________
>         Developer mailing list
>         Developer at lists.illumos.org
>         http://lists.illumos.org/m/listinfo/developer
> 
> 
> 
> -- 
> Eric Schrock
> Delphix
> 
> 
> 275 Middlefield Road, Suite 50
> Menlo Park, CA 94025
> http://www.delphix.com
> 
> 
> _______________________________________________
> Developer mailing list
> Developer at lists.illumos.org
> http://lists.illumos.org/m/listinfo/developer





More information about the Developer mailing list