Lines Matching defs:cn

100 	prop_changenode_t *cn;
107 for (cn = uu_list_first(clp->cl_list); cn != NULL;
108 cn = uu_list_next(clp->cl_list, cn)) {
112 cn->cn_needpost = B_FALSE;
120 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
123 if (!ZFS_IS_VOLUME(cn->cn_handle)) {
131 if (zfs_unmount(cn->cn_handle, NULL,
134 cn->cn_needpost = B_FALSE;
138 (void) zfs_unshare_smb(cn->cn_handle, NULL);
165 prop_changenode_t *cn;
177 if ((cn = uu_list_last(clp->cl_list)) == NULL)
182 remove_mountpoint(cn->cn_handle);
191 if (cn->cn_handle != NULL) {
192 hdl = cn->cn_handle->zfs_hdl;
202 for (cn = uu_list_last(clp->cl_list); cn != NULL;
203 cn = uu_list_prev(clp->cl_list, cn)) {
213 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
217 if (!cn->cn_needpost)
219 cn->cn_needpost = B_FALSE;
221 zfs_refresh_properties(cn->cn_handle);
223 if (ZFS_IS_VOLUME(cn->cn_handle))
230 sharenfs = ((zfs_prop_get(cn->cn_handle, ZFS_PROP_SHARENFS,
234 sharesmb = ((zfs_prop_get(cn->cn_handle, ZFS_PROP_SHARESMB,
239 zfs_is_mounted(cn->cn_handle, NULL);
241 if (!mounted && (cn->cn_mounted ||
243 (zfs_prop_get_int(cn->cn_handle,
246 if (zfs_mount(cn->cn_handle, NULL, 0) != 0)
258 errors += zfs_share_nfs(cn->cn_handle);
259 else if (cn->cn_shared || clp->cl_waslegacy)
260 errors += zfs_unshare_nfs(cn->cn_handle, NULL);
262 errors += zfs_share_smb(cn->cn_handle);
263 else if (cn->cn_shared || clp->cl_waslegacy)
264 errors += zfs_unshare_smb(cn->cn_handle, NULL);
299 prop_changenode_t *cn;
302 for (cn = uu_list_first(clp->cl_list); cn != NULL;
303 cn = uu_list_next(clp->cl_list, cn)) {
307 if (!isa_child_of(cn->cn_handle->zfs_name, src))
313 remove_mountpoint(cn->cn_handle);
316 (void) strcat(newname, cn->cn_handle->zfs_name + strlen(src));
318 (void) strlcpy(cn->cn_handle->zfs_name, newname,
319 sizeof (cn->cn_handle->zfs_name));
330 prop_changenode_t *cn;
337 for (cn = uu_list_first(clp->cl_list); cn != NULL;
338 cn = uu_list_next(clp->cl_list, cn)) {
339 if (zfs_unshare_proto(cn->cn_handle, NULL, proto) != 0)
363 prop_changenode_t *cn;
365 for (cn = uu_list_first(clp->cl_list); cn != NULL;
366 cn = uu_list_next(clp->cl_list, cn)) {
368 if (strcmp(cn->cn_handle->zfs_name, name) == 0) {
369 uu_list_remove(clp->cl_list, cn);
370 zfs_close(cn->cn_handle);
371 free(cn);
383 prop_changenode_t *cn;
388 while ((cn = uu_list_teardown(clp->cl_list, &cookie)) != NULL) {
389 zfs_close(cn->cn_handle);
390 free(cn);
407 prop_changenode_t *cn;
448 if ((cn = zfs_alloc(zfs_get_handle(zhp),
454 cn->cn_handle = zhp;
455 cn->cn_mounted = (clp->cl_gflags & CL_GATHER_MOUNT_ALWAYS) ||
457 cn->cn_shared = zfs_is_shared(zhp);
458 cn->cn_zoned = zfs_prop_get_int(zhp, ZFS_PROP_ZONED);
459 cn->cn_needpost = B_TRUE;
462 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
465 uu_list_node_init(cn, &cn->cn_listnode, clp->cl_pool);
470 (void) uu_list_find(clp->cl_list, cn, NULL,
472 uu_list_insert(clp->cl_list, cn, idx);
483 uu_list_first(clp->cl_list), cn) == 0);
543 prop_changenode_t *cn;
659 if ((cn = zfs_alloc(zhp->zfs_hdl,
666 cn->cn_handle = temp;
667 cn->cn_mounted = (clp->cl_gflags & CL_GATHER_MOUNT_ALWAYS) ||
669 cn->cn_shared = zfs_is_shared(temp);
670 cn->cn_zoned = zfs_prop_get_int(zhp, ZFS_PROP_ZONED);
671 cn->cn_needpost = B_TRUE;
673 uu_list_node_init(cn, &cn->cn_listnode, clp->cl_pool);
676 (void) uu_list_find(clp->cl_list, cn, NULL, &idx);
677 uu_list_insert(clp->cl_list, cn, idx);
686 uu_list_last(clp->cl_list), cn) == 0);