From 96c2e961938d4018ddb393fa60e004d8a91a58e9 Mon Sep 17 00:00:00 2001 From: Keith M Wesolowski Date: Sat, 27 Jul 2013 10:51:50 -0700 Subject: Illumos #3894 3894 zfs should not allow snapshot of inconsistent dataset Reviewed by: Matthew Ahrens Approved by: Gordon Ross References: https://www.illumos.org/issues/3894 illumos/illumos-gate@ca48f36f20f6098ceb19d5b084b6b3d4b8eca9fa Ported-by: Richard Yao Signed-off-by: Brian Behlendorf Issue #1775 --- cmd/zfs/zfs_main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/zfs') diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 08d16aa1f..fba3e255c 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -3480,6 +3480,12 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void *arg) 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(); -- cgit v1.2.3