Lines Matching refs:mountpoint

36  * mountpoint.
131 * Search the sharetab for the given mountpoint and protocol, returning
135 is_shared(libzfs_handle_t *hdl, const char *mountpoint, zfs_share_proto_t proto)
147 /* the mountpoint is the first entry on each line */
152 if (strcmp(buf, mountpoint) == 0) {
281 * in 'where' with the current mountpoint, and return 1. Otherwise, we return
305 zfs_is_mountable_internal(zfs_handle_t *zhp, const char *mountpoint)
317 * mountpoint in 'buf'.
354 char mountpoint[ZFS_MAXPROPLEN];
356 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
359 return (zfs_mount_at(zhp, options, flags, mountpoint));
364 const char *mountpoint)
381 if (!zfs_is_mountable_internal(zhp, mountpoint))
385 if (lstat(mountpoint, &buf) != 0) {
386 if (mkdirp(mountpoint, 0755) != 0) {
388 "failed to create mountpoint"));
391 mountpoint));
397 * Determine if the mountpoint is empty. If so, refuse to perform the
404 !dir_is_empty(mountpoint)) {
408 dgettext(TEXT_DOMAIN, "cannot mount '%s'"), mountpoint));
413 if (zmount(zfs_get_name(zhp), mountpoint, flags,
422 "mountpoint or dataset is busy"));
447 libzfs_mnttab_add(hdl, zfs_get_name(zhp), mountpoint,
456 unmount_one(libzfs_handle_t *hdl, const char *mountpoint, int flags)
458 if (umount2(mountpoint, flags) != 0) {
462 mountpoint));
472 zfs_unmount(zfs_handle_t *zhp, const char *mountpoint, int flags)
479 if (mountpoint != NULL || ((zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) &&
482 * mountpoint may have come from a call to
487 if (mountpoint == NULL)
490 mntpt = zfs_strdup(hdl, mountpoint);
511 * Unmount this filesystem and any children inheriting the mountpoint property.
512 * To do this, just act like we're changing the mountpoint property, but don't
567 char *mountpoint;
570 if (!zfs_is_mounted(zhp, &mountpoint))
573 if ((rc = is_shared(zhp->zfs_hdl, mountpoint, proto))
576 *where = mountpoint;
578 free(mountpoint);
581 free(mountpoint);
842 char mountpoint[ZFS_MAXPROPLEN];
850 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
884 share = zfs_sa_find_share(hdl->libzfs_sharehdl, mountpoint);
896 NULL, NULL, mountpoint,
906 mountpoint);
928 error = fsshare(ZFS_EXPORTS_PATH, mountpoint, "");
930 error = fsshare(ZFS_EXPORTS_PATH, mountpoint, shareopts);
965 * Unshare a filesystem by mountpoint.
968 unshare_one(libzfs_handle_t *hdl, const char *name, const char *mountpoint,
981 mntpt = zfs_strdup(hdl, mountpoint);
1023 err = fsunshare(ZFS_EXPORTS_PATH, mountpoint);
1038 zfs_unshare_proto(zfs_handle_t *zhp, const char *mountpoint,
1047 if (mountpoint != NULL)
1048 mountpoint = mntpt = zfs_strdup(hdl, mountpoint);
1050 if (mountpoint != NULL || ((zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) &&
1054 if (mountpoint == NULL)
1076 zfs_unshare_nfs(zfs_handle_t *zhp, const char *mountpoint)
1078 return (zfs_unshare_proto(zhp, mountpoint, nfs_only));
1082 zfs_unshare_smb(zfs_handle_t *zhp, const char *mountpoint)
1084 return (zfs_unshare_proto(zhp, mountpoint, smb_only));
1125 zfs_unshareall_bypath(zfs_handle_t *zhp, const char *mountpoint)
1127 return (zfs_unshare_proto(zhp, mountpoint, share_all_proto));
1131 * Remove the mountpoint associated with the current dataset, if necessary.
1134 * - The mountpoint is not 'none' or 'legacy'
1135 * - The mountpoint is non-empty
1136 * - The mountpoint is the default or inherited
1144 char mountpoint[ZFS_MAXPROPLEN];
1147 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint),
1159 (void) rmdir(mountpoint);
1222 * Sort comparator that compares two mountpoint paths. We sort these paths so
1225 * Since filesystems from non-global zones can have the same mountpoint
1298 * If neither filesystem has a mountpoint, revert to sorting by
1418 char mountpoint[ZFS_MAXPROPLEN];
1420 verify(zfs_prop_get(handles[idx], ZFS_PROP_MOUNTPOINT, mountpoint,
1421 sizeof (mountpoint), NULL, NULL, 0, B_FALSE) == 0);
1429 * descendant mountpoint of the one we just mounted, then skip all of
1430 * its descendants, dispatch the next descendant mountpoint, and so on.
1440 if (!libzfs_path_contains(mountpoint, child))
1453 * of handles by mountpoint.
1482 * Sort the datasets by mountpoint. See mountpoint_cmp for details
1502 * root mountpoint, e.g.: /foo /bar. Dispatch a mount task for each of
1674 * mountpoint, so failure is not fatal.
1683 * mountpoint.