Lines Matching defs:cn

98 	prop_changenode_t *cn;
120 while ((cn = uu_avl_walk_next(walk)) != NULL) {
124 cn->cn_needpost = B_FALSE;
132 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
135 if (!ZFS_IS_VOLUME(cn->cn_handle)) {
141 if (zfs_unmount(cn->cn_handle, NULL,
144 cn->cn_needpost = B_FALSE;
148 (void) zfs_unshare(cn->cn_handle, NULL,
180 prop_changenode_t *cn;
201 if ((cn = uu_avl_last(clp->cl_tree)) == NULL)
206 remove_mountpoint(cn->cn_handle);
217 while ((cn = uu_avl_walk_next(walk)) != NULL) {
228 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
232 if (!cn->cn_needpost)
234 cn->cn_needpost = B_FALSE;
236 zfs_refresh_properties(cn->cn_handle);
238 if (ZFS_IS_VOLUME(cn->cn_handle))
245 sharenfs = ((zfs_prop_get(cn->cn_handle, ZFS_PROP_SHARENFS,
249 sharesmb = ((zfs_prop_get(cn->cn_handle, ZFS_PROP_SHARESMB,
253 needs_key = (zfs_prop_get_int(cn->cn_handle,
256 mounted = zfs_is_mounted(cn->cn_handle, NULL);
258 if (!mounted && !needs_key && (cn->cn_mounted ||
262 (zfs_prop_get_int(cn->cn_handle,
265 if (zfs_mount(cn->cn_handle, NULL, 0) == 0)
277 zfs_share(cn->cn_handle, nfs);
279 } else if (cn->cn_shared || clp->cl_waslegacy) {
280 zfs_unshare(cn->cn_handle, NULL, nfs);
286 zfs_share(cn->cn_handle, smb);
288 } else if (cn->cn_shared || clp->cl_waslegacy) {
289 zfs_unshare(cn->cn_handle, NULL, smb);
335 prop_changenode_t *cn;
342 while ((cn = uu_avl_walk_next(walk)) != NULL) {
346 if (!isa_child_of(cn->cn_handle->zfs_name, src))
352 remove_mountpoint(cn->cn_handle);
355 (void) strlcat(newname, cn->cn_handle->zfs_name + strlen(src),
358 (void) strlcpy(cn->cn_handle->zfs_name, newname,
359 sizeof (cn->cn_handle->zfs_name));
372 prop_changenode_t *cn;
383 while ((cn = uu_avl_walk_next(walk)) != NULL) {
384 if (zfs_unshare(cn->cn_handle, NULL, proto) != 0)
412 prop_changenode_t *cn;
418 while ((cn = uu_avl_walk_next(walk)) != NULL) {
419 if (strcmp(cn->cn_handle->zfs_name, name) == 0) {
420 uu_avl_remove(clp->cl_tree, cn);
421 zfs_close(cn->cn_handle);
422 free(cn);
437 prop_changenode_t *cn;
446 while ((cn = uu_avl_walk_next(walk)) != NULL) {
447 uu_avl_remove(clp->cl_tree, cn);
448 zfs_close(cn->cn_handle);
449 free(cn);
468 prop_changenode_t *cn;
473 cn = zfs_alloc(zfs_get_handle(zhp), sizeof (prop_changenode_t));
474 cn->cn_handle = zhp;
475 cn->cn_mounted = zfs_is_mounted(zhp, NULL);
476 ASSERT3U(cn->cn_mounted, ==, B_TRUE);
477 cn->cn_shared = zfs_is_shared(zhp, NULL, NULL);
478 cn->cn_zoned = zfs_prop_get_int(zhp, ZFS_PROP_ZONED);
479 cn->cn_needpost = B_TRUE;
482 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
485 uu_avl_node_init(cn, &cn->cn_treenode, clp->cl_pool);
487 if (uu_avl_find(clp->cl_tree, cn, NULL, &idx) == NULL) {
488 uu_avl_insert(clp->cl_tree, cn, idx);
490 free(cn);
503 prop_changenode_t *cn = NULL;
543 cn = zfs_alloc(zfs_get_handle(zhp), sizeof (prop_changenode_t));
544 cn->cn_handle = zhp;
545 cn->cn_mounted = (clp->cl_gflags & CL_GATHER_MOUNT_ALWAYS) ||
547 cn->cn_shared = zfs_is_shared(zhp, NULL, NULL);
548 cn->cn_zoned = zfs_prop_get_int(zhp, ZFS_PROP_ZONED);
549 cn->cn_needpost = B_TRUE;
552 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
555 uu_avl_node_init(cn, &cn->cn_treenode, clp->cl_pool);
559 if (uu_avl_find(clp->cl_tree, cn, NULL, &idx) == NULL) {
560 uu_avl_insert(clp->cl_tree, cn, idx);
562 free(cn);
563 cn = NULL;
573 if (cn != NULL)
641 prop_changenode_t *cn;
760 cn = zfs_alloc(zhp->zfs_hdl, sizeof (prop_changenode_t));
761 cn->cn_handle = temp;
762 cn->cn_mounted = (clp->cl_gflags & CL_GATHER_MOUNT_ALWAYS) ||
764 cn->cn_shared = zfs_is_shared(temp, NULL, NULL);
765 cn->cn_zoned = zfs_prop_get_int(zhp, ZFS_PROP_ZONED);
766 cn->cn_needpost = B_TRUE;
768 uu_avl_node_init(cn, &cn->cn_treenode, clp->cl_pool);
770 if (uu_avl_find(clp->cl_tree, cn, NULL, &idx) == NULL) {
771 uu_avl_insert(clp->cl_tree, cn, idx);
773 free(cn);