Lines Matching refs:cn

96 	prop_changenode_t *cn;
103 for (cn = uu_list_first(clp->cl_list); cn != NULL;
104 cn = uu_list_next(clp->cl_list, cn)) {
108 cn->cn_needpost = B_FALSE;
116 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
119 if (!ZFS_IS_VOLUME(cn->cn_handle)) {
125 if (zfs_unmount(cn->cn_handle, NULL,
128 cn->cn_needpost = B_FALSE;
132 (void) zfs_unshare_smb(cn->cn_handle, NULL);
156 prop_changenode_t *cn;
168 if ((cn = uu_list_last(clp->cl_list)) == NULL)
172 remove_mountpoint(cn->cn_handle);
180 if (cn->cn_handle != NULL) {
181 hdl = cn->cn_handle->zfs_hdl;
191 for (cn = uu_list_last(clp->cl_list); cn != NULL;
192 cn = uu_list_prev(clp->cl_list, cn)) {
202 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
206 if (!cn->cn_needpost)
208 cn->cn_needpost = B_FALSE;
210 zfs_refresh_properties(cn->cn_handle);
212 if (ZFS_IS_VOLUME(cn->cn_handle))
219 sharenfs = ((zfs_prop_get(cn->cn_handle, ZFS_PROP_SHARENFS,
223 sharesmb = ((zfs_prop_get(cn->cn_handle, ZFS_PROP_SHARESMB,
227 mounted = zfs_is_mounted(cn->cn_handle, NULL);
229 if (!mounted && (cn->cn_mounted ||
231 (zfs_prop_get_int(cn->cn_handle,
234 if (zfs_mount(cn->cn_handle, NULL, 0) != 0)
246 errors += zfs_share_nfs(cn->cn_handle);
247 else if (cn->cn_shared || clp->cl_waslegacy)
248 errors += zfs_unshare_nfs(cn->cn_handle, NULL);
250 errors += zfs_share_smb(cn->cn_handle);
251 else if (cn->cn_shared || clp->cl_waslegacy)
252 errors += zfs_unshare_smb(cn->cn_handle, NULL);
287 prop_changenode_t *cn;
290 for (cn = uu_list_first(clp->cl_list); cn != NULL;
291 cn = uu_list_next(clp->cl_list, cn)) {
295 if (!isa_child_of(cn->cn_handle->zfs_name, src))
301 remove_mountpoint(cn->cn_handle);
304 (void) strcat(newname, cn->cn_handle->zfs_name + strlen(src));
306 (void) strlcpy(cn->cn_handle->zfs_name, newname,
307 sizeof (cn->cn_handle->zfs_name));
318 prop_changenode_t *cn;
325 for (cn = uu_list_first(clp->cl_list); cn != NULL;
326 cn = uu_list_next(clp->cl_list, cn)) {
327 if (zfs_unshare_proto(cn->cn_handle, NULL, proto) != 0)
351 prop_changenode_t *cn;
353 for (cn = uu_list_first(clp->cl_list); cn != NULL;
354 cn = uu_list_next(clp->cl_list, cn)) {
356 if (strcmp(cn->cn_handle->zfs_name, name) == 0) {
357 uu_list_remove(clp->cl_list, cn);
358 zfs_close(cn->cn_handle);
359 free(cn);
371 prop_changenode_t *cn;
376 while ((cn = uu_list_teardown(clp->cl_list, &cookie)) != NULL) {
377 zfs_close(cn->cn_handle);
378 free(cn);
395 prop_changenode_t *cn;
436 if ((cn = zfs_alloc(zfs_get_handle(zhp),
442 cn->cn_handle = zhp;
443 cn->cn_mounted = (clp->cl_gflags & CL_GATHER_MOUNT_ALWAYS) ||
445 cn->cn_shared = zfs_is_shared(zhp);
446 cn->cn_zoned = zfs_prop_get_int(zhp, ZFS_PROP_ZONED);
447 cn->cn_needpost = B_TRUE;
450 if (getzoneid() == GLOBAL_ZONEID && cn->cn_zoned)
453 uu_list_node_init(cn, &cn->cn_listnode, clp->cl_pool);
458 (void) uu_list_find(clp->cl_list, cn, NULL,
460 uu_list_insert(clp->cl_list, cn, idx);
472 uu_list_first(clp->cl_list), cn) == 0);
532 prop_changenode_t *cn;
648 if ((cn = zfs_alloc(zhp->zfs_hdl,
655 cn->cn_handle = temp;
656 cn->cn_mounted = (clp->cl_gflags & CL_GATHER_MOUNT_ALWAYS) ||
658 cn->cn_shared = zfs_is_shared(temp);
659 cn->cn_zoned = zfs_prop_get_int(zhp, ZFS_PROP_ZONED);
660 cn->cn_needpost = B_TRUE;
662 uu_list_node_init(cn, &cn->cn_listnode, clp->cl_pool);
665 (void) uu_list_find(clp->cl_list, cn, NULL, &idx);
666 uu_list_insert(clp->cl_list, cn, idx);
675 uu_list_last(clp->cl_list), cn) == 0);