equal
deleted
inserted
replaced
105 |
105 |
106 /* |
106 /* |
107 * If we have a volume and this was a rename, remove the |
107 * If we have a volume and this was a rename, remove the |
108 * /dev/zvol links |
108 * /dev/zvol links |
109 */ |
109 */ |
110 if (cn->cn_handle->zfs_volblocksize && |
110 if (ZFS_IS_VOLUME(cn->cn_handle) && |
111 clp->cl_realprop == ZFS_PROP_NAME) { |
111 clp->cl_realprop == ZFS_PROP_NAME) { |
112 if (zvol_remove_link(cn->cn_handle->zfs_hdl, |
112 if (zvol_remove_link(cn->cn_handle->zfs_hdl, |
113 cn->cn_handle->zfs_name) != 0) |
113 cn->cn_handle->zfs_name) != 0) |
114 ret = -1; |
114 ret = -1; |
115 } else if (zfs_unmount(cn->cn_handle, NULL, clp->cl_flags) != 0) |
115 } else if (zfs_unmount(cn->cn_handle, NULL, clp->cl_flags) != 0) |
164 |
164 |
165 /* |
165 /* |
166 * If this is a volume and we're doing a rename, recreate the |
166 * If this is a volume and we're doing a rename, recreate the |
167 * /dev/zvol links. |
167 * /dev/zvol links. |
168 */ |
168 */ |
169 if (cn->cn_handle->zfs_volblocksize && |
169 if (ZFS_IS_VOLUME(cn->cn_handle) && |
170 clp->cl_realprop == ZFS_PROP_NAME) { |
170 clp->cl_realprop == ZFS_PROP_NAME) { |
171 if (zvol_create_link(cn->cn_handle->zfs_hdl, |
171 if (zvol_create_link(cn->cn_handle->zfs_hdl, |
172 cn->cn_handle->zfs_name) != 0) |
172 cn->cn_handle->zfs_name) != 0) |
173 ret = -1; |
173 ret = -1; |
174 continue; |
174 continue; |
356 * over all children regardless, since we need them unmounted in order |
356 * over all children regardless, since we need them unmounted in order |
357 * to do the rename. Also, if this is a volume and we're doing a |
357 * to do the rename. Also, if this is a volume and we're doing a |
358 * rename, then always add it to the changelist. |
358 * rename, then always add it to the changelist. |
359 */ |
359 */ |
360 |
360 |
361 if (!(zhp->zfs_volblocksize && clp->cl_realprop == ZFS_PROP_NAME) && |
361 if (!(ZFS_IS_VOLUME(zhp) && clp->cl_realprop == ZFS_PROP_NAME) && |
362 zfs_prop_get(zhp, clp->cl_prop, property, |
362 zfs_prop_get(zhp, clp->cl_prop, property, |
363 sizeof (property), &sourcetype, where, sizeof (where), |
363 sizeof (property), &sourcetype, where, sizeof (where), |
364 B_FALSE) != 0) { |
364 B_FALSE) != 0) { |
365 zfs_close(zhp); |
365 zfs_close(zhp); |
366 return (0); |
366 return (0); |
506 clp->cl_prop = ZFS_PROP_MOUNTPOINT; |
506 clp->cl_prop = ZFS_PROP_MOUNTPOINT; |
507 clp->cl_alldependents = B_TRUE; |
507 clp->cl_alldependents = B_TRUE; |
508 } else if (prop == ZFS_PROP_ZONED) { |
508 } else if (prop == ZFS_PROP_ZONED) { |
509 clp->cl_prop = ZFS_PROP_MOUNTPOINT; |
509 clp->cl_prop = ZFS_PROP_MOUNTPOINT; |
510 clp->cl_allchildren = B_TRUE; |
510 clp->cl_allchildren = B_TRUE; |
|
511 } else if (prop == ZFS_PROP_CANMOUNT) { |
|
512 clp->cl_prop = ZFS_PROP_MOUNTPOINT; |
511 } else { |
513 } else { |
512 clp->cl_prop = prop; |
514 clp->cl_prop = prop; |
513 } |
515 } |
514 clp->cl_realprop = prop; |
516 clp->cl_realprop = prop; |
515 |
517 |