Lines Matching refs:mountpoint

208  * Check if zfs-arbitrated sharing is possible at the mountpoint level.
214 char mountpoint[MAXPATHLEN];
219 VERIFY(zfs_get_mountpoint(zhp, mountpoint,
220 sizeof (mountpoint)) == 0);
222 if ((strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) == 0) ||
223 strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) == 0)
229 * Called for a share or a filesystem to check if the mountpoint is in a
230 * state where shares under this mountpoint could be shared.
238 * We make a best effort to set "mountpoint" to the accurate mountpoint
242 zfs_is_shareable(zfs_handle_t *zhp, char *mountpoint, size_t mpsize,
250 ASSERT(mountpoint != NULL && mpsize > 0);
251 mountpoint[0] = '\0';
265 if (zfs_get_mountpoint(ds_zhp, mountpoint, mpsize) != 0)
268 if ((strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) == 0) ||
269 strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) == 0) {
273 "mountpoint is '%s'"), zfs_get_name(ds_zhp),
274 mountpoint);
277 * Fill in the mountpoint based on the dataset path in case
281 mountpoint[0] = '/';
282 (void) strlcpy(mountpoint + 1, zfs_get_name(ds_zhp),
293 zfs_get_name(ds_zhp), mountpoint);
305 "shared in the current zone"), mountpoint);
388 * protocols are counted as enabled at the mountpoint level.
484 char *mountpoint;
491 !zfs_is_mounted(zhp, &mountpoint)) {
493 "cannot acquire mountpoint"));
498 rc = sa_share_read(ZFS_LIBSHARE_HDL(zhp), mountpoint, sh_name,
500 free(mountpoint);
518 char *mountpoint;
526 !zfs_is_mounted(zhp, &mountpoint))
529 rc = sa_share_read_init(ZFS_LIBSHARE_HDL(zhp), mountpoint,
531 free(mountpoint);
606 char *mountpoint;
614 !zfs_is_mounted(zhp, &mountpoint)) {
616 "cannot acquire mountpoint"));
621 rc = sa_share_remove(shdl, sh_name, mountpoint, B_TRUE);
622 free(mountpoint);
1044 const char *mountpoint, zfs_sharing_whatsnew_t whatsnew,
1072 sh_err = sa_share_read_oldprop_shares(mountpoint, zhp->zfs_name,
1219 * Translate the absolute share path used by libshare to the mountpoint-relative
1546 * shares are stored in /mountpoint/.zfs/shares
1568 * shares are stored in /mountpoint/.zfs/shares/sharename
1719 * shares are stored with paths relative to the mountpoint.
1720 * So strip the mountpoint from the share path and update the share.
2367 * mountpoint level.
3312 zfs_share_filter(zfs_handle_t *zhp, nvlist_t *props, const char *mountpoint,
3320 ASSERT(mountpoint != NULL || newsharename == NULL);
3322 if (mountpoint == NULL) {
3352 if (mountpoint[0] == '\0')
3357 err = nvlist_add_string(props, "share.path", mountpoint);
3359 len = strlen(mountpoint) + 1 + strlen(strval);
3365 (void) snprintf(sharepoint, len + 1, "%s/%s", mountpoint,
3394 ASSERT(mountpoint[(len = strlen(mountpoint)) - 1] != '/' || len == 1);
3395 err = nvlist_add_string(props, "share.mntpnt", mountpoint);
3417 char mountpoint[MAXPATHLEN];
3425 mountpoint[0] = '\0';
3426 if (!zfs_is_shareable(zhp, mountpoint, sizeof (mountpoint),
3467 ret = zfs_share_filter(zhp, oldprops->sp_nvl, mountpoint,
3482 ret = zfs_get_validated_share(zhp, oldprops, mountpoint, whatsnew,
3510 char mountpoint[MAXPATHLEN];
3515 if (!zfs_is_shareable(zhp, mountpoint, sizeof (mountpoint), B_FALSE))
3530 mountpoint, oldname, newname);
3590 char mountpoint[MAXPATHLEN];
3603 if (!zfs_is_shareable(zhp, mountpoint, sizeof (mountpoint), B_FALSE))
3621 ret = zfs_get_validated_share(zhp, sp, mountpoint,
3693 * Specify share path as an absolute path or a path relative to the mountpoint.
3695 * the mountpoint-relative path and returns a pointer to that path through the
3701 const char *mountpoint, nvlist_t *props, const char **value)
3712 /* append relative path to the mountpoint */
3713 len = strlcpy(buf, mountpoint, sizeof (buf));
3730 if ((len = zfs_strstarts(path, mountpoint, 0)) < 0)
4448 * If filesystem is canmount=off or mountpoint=legacy or mountpoint=none
4670 char mountpoint[ZFS_MAXPROPLEN];
4680 if (!zfs_is_shareable(zhp, mountpoint, sizeof (mountpoint), B_FALSE))
4683 return (zfs_sharing_upgrade_impl(zhp, mountpoint));
4687 zfs_sharing_upgrade_impl(zfs_handle_t *zhp, const char *mountpoint)
4780 zfs_is_shared_s2(zhp, mountpoint)) {
4835 mountpoint, share, B_TRUE, newshare2);
4854 (void) zfs_clear_s2_shares(zhp, mountpoint);