Darren J Moffat wrote:
> On 11/06/2010 11:42, Arne Jansen wrote:
>> Darren J Moffat wrote:
>>>> But the following document says "Recursive ZFS snapshots are created
>>>> quickly as one atomic operation. The snapshots are created together
>>>> (all
>>>> at once) or not created at all."
>>>> http://docs.sun.com/app/docs/doc/819-5461/gdfdt?a=view
>>>
>>> I've looked at the code again - I miss read part of it - it does appear
>>> to be an "all or nothing" both for the create and destroy.
>>>
>>
>> I read the code differently, zfs destroy does the iteration in the
>> zfs utility, not even in libzfs. The ioctl doesn't even have a recurse
>> flag.
> 
> In zfs_do_destroy() if recurse is set we call zfs_destroy_snaps()
> 
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libzfs/common/libzfs_dataset.c#zfs_destroy_snaps
> 
> 
> Which makes a single ioctl call ZFS_IOC_DESTROY_SNAPS
> 

Ah! There's an extra ioctl for a recursive snapshot delete, I missed
that part. Many thanks! This will also help me with my multi-snapshot-
destroy-module. I should at least have checked with a simple truss...

You made my day :)

--Arne
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to