diff options
author | delphij <delphij@FreeBSD.org> | 2013-06-25 22:14:32 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2013-06-25 22:14:32 +0000 |
commit | 4dfc3c75a2687795bcf32661c8434cf7628e82a2 (patch) | |
tree | 4b1454baea37713509a3ede6d1c64c528e9a810f /cddl/contrib/opensolaris/lib/libzfs_core/common | |
parent | 524046622706f82ee0244247e5a37dc1c966856f (diff) | |
download | FreeBSD-src-4dfc3c75a2687795bcf32661c8434cf7628e82a2.zip FreeBSD-src-4dfc3c75a2687795bcf32661c8434cf7628e82a2.tar.gz |
MFV r252215:
Restore a previous behavior before r251646, where when destructing
ZFS snapshot, the ioctl would return ENOENT when it hit any of
them in the errlist (the new behavior was only return ENOENT when
all returns error).
Illumos ZFS issues:
3829 fix for 3740 changed behavior of zfs destroy/hold/release ioctl
MFC after: 1 week
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs_core/common')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c index 31d5fd5..c5c3b0e 100644 --- a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c +++ b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c @@ -302,11 +302,8 @@ lzc_snapshot(nvlist_t *snaps, nvlist_t *props, nvlist_t **errlist) * marked for deferred destruction, and will be destroyed when the last hold * or clone is removed/destroyed. * - * The return value will be ENOENT if none of the snapshots existed. - * * The return value will be 0 if all snapshots were destroyed (or marked for - * later destruction if 'defer' is set) or didn't exist to begin with and - * at least one snapshot was destroyed. + * later destruction if 'defer' is set) or didn't exist to begin with. * * Otherwise the return value will be the errno of a (unspecified) snapshot * that failed, no snapshots will be destroyed, and the errlist will have an @@ -397,15 +394,10 @@ lzc_exists(const char *dataset) * or imported. * * Holds for snapshots which don't exist will be skipped and have an entry - * added to errlist, but will not cause an overall failure, except in the - * case that all holds where skipped. - * - * The return value will be ENOENT if none of the snapshots for the requested - * holds existed. + * added to errlist, but will not cause an overall failure. * - * The return value will be 0 if the nvl holds was empty or all holds, for - * snapshots that existed, were succesfully created and at least one hold - * was created. + * The return value will be 0 if all holds, for snapshots that existed, + * were succesfully created. * * Otherwise the return value will be the errno of a (unspecified) hold that * failed and no holds will be created. @@ -449,13 +441,10 @@ lzc_hold(nvlist_t *holds, int cleanup_fd, nvlist_t **errlist) * The value is a nvlist whose keys are the holds to remove. * * Holds which failed to release because they didn't exist will have an entry - * added to errlist, but will not cause an overall failure, except in the - * case that all releases where skipped. - * - * The return value will be ENOENT if none of the specified holds existed. + * added to errlist, but will not cause an overall failure. * * The return value will be 0 if the nvl holds was empty or all holds that - * existed, were successfully removed and at least one hold was removed. + * existed, were successfully removed. * * Otherwise the return value will be the errno of a (unspecified) hold that * failed to release and no holds will be released. |