Print this page
NEX-3669 Faults for fans that don't exist
Reviewed by: Jeffry Molanus <jeffry.molanus@nexenta.com>
NEX-3891 Hide the snapshots that belong to in-kernel autosnap-service
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Alek Pinchuk <alek@nexenta.com>
@@ -93,10 +93,13 @@
{
callback_data_t *cb = data;
boolean_t should_close = B_TRUE;
boolean_t include_snaps = zfs_include_snapshots(zhp, cb);
boolean_t include_bmarks = (cb->cb_types & ZFS_TYPE_BOOKMARK);
+ boolean_t include_autosnaps =
+ ((cb->cb_types & ZFS_TYPE_AUTOSNAP) &&
+ !(cb->cb_flags & ZFS_ITER_PROP_LISTSNAPS));
if ((zfs_get_type(zhp) & cb->cb_types) ||
((zfs_get_type(zhp) == ZFS_TYPE_SNAPSHOT) && include_snaps)) {
uu_avl_index_t idx;
zfs_node_t *node = safe_malloc(sizeof (zfs_node_t));
@@ -134,14 +137,24 @@
cb->cb_depth < cb->cb_depth_limit)) {
cb->cb_depth++;
if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM)
(void) zfs_iter_filesystems(zhp, zfs_callback, data);
if (((zfs_get_type(zhp) & (ZFS_TYPE_SNAPSHOT |
- ZFS_TYPE_BOOKMARK)) == 0) && include_snaps)
+ ZFS_TYPE_BOOKMARK | ZFS_TYPE_AUTOSNAP)) == 0)) {
+ if (include_snaps) {
(void) zfs_iter_snapshots(zhp,
- (cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback,
- data);
+ (cb->cb_flags & ZFS_ITER_SIMPLE) != 0,
+ zfs_callback, data);
+ }
+
+ if (include_autosnaps) {
+ (void) zfs_iter_autosnapshots(zhp,
+ (cb->cb_flags & ZFS_ITER_SIMPLE) != 0,
+ zfs_callback, data);
+ }
+ }
+
if (((zfs_get_type(zhp) & (ZFS_TYPE_SNAPSHOT |
ZFS_TYPE_BOOKMARK)) == 0) && include_bmarks)
(void) zfs_iter_bookmarks(zhp, zfs_callback, data);
cb->cb_depth--;
}