diff options
author | mm <mm@FreeBSD.org> | 2012-07-13 12:37:34 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2012-07-13 12:37:34 +0000 |
commit | 98fa6a1cdbda0168d4fbbf91839fd17b4f842873 (patch) | |
tree | 0b26862b3421ec92b92c483a3af03f3ae2c00c67 /cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c | |
parent | 73c1cd9e1135a5f68cebf28e8d0b1353df844fa8 (diff) | |
download | FreeBSD-src-98fa6a1cdbda0168d4fbbf91839fd17b4f842873.zip FreeBSD-src-98fa6a1cdbda0168d4fbbf91839fd17b4f842873.tar.gz |
Merge illumos commit 13749:df4cd82e2b60
1796 "ZFS HOLD" should not be used when doing "ZFS SEND" froma read-only pool
2871 support for __ZFS_POOL_RESTRICT used by ZFS test suite
2903 zfs destroy -d does not work
2957 zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot
References:
https://www.illumos.org/issues/1796
https://www.illumos.org/issues/2871
https://www.illumos.org/issues/2903
https://www.illumos.org/issues/2957
MFC after: 1 week
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c index 895475a..63c2a05 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c @@ -3138,7 +3138,8 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type, /* * Destroys the given dataset. The caller must make sure that the filesystem - * isn't mounted, and that there are no active dependents. + * isn't mounted, and that there are no active dependents. If the file system + * does not exist this function does nothing. */ int zfs_destroy(zfs_handle_t *zhp, boolean_t defer) @@ -3154,7 +3155,8 @@ zfs_destroy(zfs_handle_t *zhp, boolean_t defer) } zc.zc_defer_destroy = defer; - if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY, &zc) != 0) { + if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY, &zc) != 0 && + errno != ENOENT) { return (zfs_standard_error_fmt(zhp->zfs_hdl, errno, dgettext(TEXT_DOMAIN, "cannot destroy '%s'"), zhp->zfs_name)); |