Date: Mon, 29 Jul 2013 20:31:44 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253781 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zfs vendor/illumos/dist/lib/... Message-ID: <201307292031.r6TKViaH024257@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Mon Jul 29 20:31:44 2013 New Revision: 253781 URL: http://svnweb.freebsd.org/changeset/base/253781 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 14089:520f3adc5d46: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 29 20:31:44 2013 (r253781) @@ -3461,6 +3461,12 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void int rv = 0; int error; + if (sd->sd_recursive && + zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) != 0) { + zfs_close(zhp); + return (0); + } + error = asprintf(&name, "%s@%s", zfs_get_name(zhp), sd->sd_snapname); if (error == -1) nomem(); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 29 20:31:44 2013 (r253781) @@ -1843,6 +1843,10 @@ get_numeric_property(zfs_handle_t *zhp, zcmd_free_nvlists(&zc); break; + case ZFS_PROP_INCONSISTENT: + *val = zhp->zfs_dmustats.dds_inconsistent; + break; + default: switch (zfs_prop_get_type(prop)) { case PROP_TYPE_NUMBER: @@ -3325,13 +3329,16 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void char name[ZFS_MAXNAMELEN]; int rv = 0; - (void) snprintf(name, sizeof (name), - "%s@%s", zfs_get_name(zhp), sd->sd_snapname); + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) == 0) { + (void) snprintf(name, sizeof (name), + "%s@%s", zfs_get_name(zhp), sd->sd_snapname); - fnvlist_add_boolean(sd->sd_nvl, name); + fnvlist_add_boolean(sd->sd_nvl, name); - rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + } zfs_close(zhp); + return (rv); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307292031.r6TKViaH024257>