summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2012-01-18 15:31:52 -0800
committerBrian Behlendorf <[email protected]>2012-01-19 09:29:48 -0800
commitff998d804ff2fec3adc91fd0e78d25998094aca9 (patch)
tree986555567c5d3db81e06c3e131b6a3f7010097fb /lib
parentb4b599d2508296a9dac0abe29532fc0884f299b7 (diff)
Ignore dataset if the dds_type is DMU_OST_OTHER
Since the zpios and potentially other ZFS tests use the DMU_OST_OTHER type to label their datasets, the zpool and zfs commands should gracefully handle this type when it is encountered. This patch modifies the commands' behavior to ignore any datasets with a dds_type of DMU_OST_OTHER. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #536
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_dataset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 44fdadd17..e8c329ced 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -413,6 +413,9 @@ make_dataset_handle_common(zfs_handle_t *zhp, zfs_cmd_t *zc)
zhp->zfs_head_type = ZFS_TYPE_VOLUME;
else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZFS)
zhp->zfs_head_type = ZFS_TYPE_FILESYSTEM;
+ else if (zhp->zfs_dmustats.dds_type == DMU_OST_OTHER)
+ return (-1); /* zpios' and other testing datasets are
+ of this type, ignore if encountered */
else
abort();