Lines Matching defs:mountpoint

91  * Description:	Mounts a BE and its subordinate datasets at a given mountpoint.
109 char *mountpoint = NULL;
132 /* Get mountpoint */
133 if (nvlist_lookup_string(be_attrs, BE_ATTR_MOUNTPOINT, &mountpoint)
148 ret = _be_mount(be_name, &mountpoint, flags);
191 /* Check if we have mountpoint argument instead of BE name */
233 * will generate a temporary mountpoint to mount the BE at. It
234 * will return this temporary mountpoint to the caller via the
302 * Fix this BE's mountpoint if its root dataset isn't set to
306 be_print_err(gettext("be_mount: mountpoint check "
320 "make temporary mountpoint\n"));
425 char mountpoint[MAXPATHLEN];
471 * BE is not mounted, fix this BE's mountpoint if its root
475 be_print_err(gettext("be_unmount: mountpoint check "
486 * If we didn't get a mountpoint from the zfs_is_mounted call,
490 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
491 sizeof (mountpoint), NULL, NULL, 0, B_FALSE) != 0) {
493 "get mountpoint of (%s)\n"), bt.obe_name);
498 (void) strlcpy(mountpoint, mp, sizeof (mountpoint));
503 if (strcmp(mountpoint, "/") == 0) {
510 ud.altroot = mountpoint;
575 char mountpoint[MAXPATHLEN];
578 /* Get mountpoint property of dataset */
579 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
580 sizeof (mountpoint), NULL, NULL, 0, B_FALSE) != 0) {
582 "get mountpoint property for %s: %s\n"), zfs_get_name(zhp),
592 if (strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) != 0) {
594 "zone root dataset mountpoint is not 'legacy'\n"));
598 /* Create the mountpoint if it doesn't exist */
603 "to create mountpoint %s\n"), md->altroot);
648 char mountpoint[MAXPATHLEN];
658 /* Get the current mountpoint property for the zone root dataset */
659 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
660 sizeof (mountpoint), NULL, NULL, 0, B_FALSE) != 0) {
662 "get mountpoint property for zone root dataset (%s): %s\n"),
667 /* If mountpoint not already set to 'legacy', set it to 'legacy' */
668 if (strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) != 0) {
672 "failed to set mountpoint of zone root dataset "
685 * of a BE and finds the ones with a legacy mountpoint. For
687 * mountpoint. If found, it adds that file system to the
712 char mountpoint[MAXPATHLEN];
801 * If the root dataset is in the vfstab with a mountpoint of "/",
805 mountpoint, sizeof (mountpoint), B_FALSE) == BE_SUCCESS) {
806 if (strcmp(mountpoint, "/") == 0) {
927 * Description: This function generates a random temporary mountpoint
928 * and creates that mountpoint directory. It returns the
929 * mountpoint in heap storage, so the caller is responsible
933 * temporary mountpoint.
967 * function returns the current mountpoint if we are able
971 * tmp_mntpnt - The temporary mountpoint that the pool's
974 * set mountpoint fails, and we've used a
978 * orig_mntpnt - The original mountpoint for the pool. If a
980 * be used to reset the mountpoint property to
981 * it's original mountpoint. It is expected that
999 char mountpoint[MAXPATHLEN];
1008 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
1009 sizeof (mountpoint), NULL, NULL, 0, B_FALSE) != 0) {
1011 "get mountpoint of (%s): %s\n"),
1016 if ((*orig_mntpnt = strdup(mountpoint)) == NULL) {
1022 * attempt to mount on a temp mountpoint
1027 "to make temporary mountpoint\n"));
1037 "to set mountpoint of pool dataset %s to "
1056 mountpoint) != 0) {
1058 "failed to set mountpoint of pool "
1085 * orig_mntpnt - The original mountpoint for the pool. This is
1086 * used to set the dataset mountpoint property
1088 * temporary mountpoint was used.
1116 "to set the mountpoint for dataset (%s) to "
1152 char mountpoint[MAXPATHLEN];
1155 /* Get dataset's mountpoint and source values */
1160 "get mountpoint and sourcetype for %s\n"),
1169 * mountpoint zfs won't immediately try to mount it.
1179 * If the mountpoint is none, there's nothing to do, goto next.
1180 * If the mountpoint is legacy, legacy mount it with mount(2).
1181 * If the mountpoint is inherited, its mountpoint should
1183 * the mountpoint now by appending its explicitly set
1184 * mountpoint value to the BE mountpoint.
1190 * If the mountpoint is set to 'legacy', we need to
1195 mountpoint, sizeof (mountpoint), B_TRUE) == BE_SUCCESS) {
1198 if (mount(fs_name, mountpoint, MS_DATA,
1203 fs_name, mountpoint);
1216 * If the mountpoint is inherited, its parent should have
1217 * already been processed so its current mountpoint value
1218 * is what its mountpoint ought to be.
1220 (void) strlcpy(mountpoint, zhp_mountpoint, sizeof (mountpoint));
1223 * Else process dataset with explicitly set mountpoint.
1225 (void) snprintf(mountpoint, sizeof (mountpoint),
1228 /* Set the new mountpoint for the dataset */
1231 mountpoint)) {
1233 "failed to set mountpoint for %s to "
1234 "%s\n"), fs_name, mountpoint);
1240 "mountpoint sourcetype of %s is %d, skipping ...\n"),
1249 "mount dataset %s at %s: %s\n"), fs_name, mountpoint,
1252 * Set this filesystem's 'mountpoint' property back to what
1286 * data - pointer to the mountpoint of where BE is mounted.
1300 char mountpoint[MAXPATHLEN];
1323 /* Get dataset's current mountpoint and source value */
1324 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
1325 sizeof (mountpoint), &sourcetype, source, sizeof (source),
1328 "failed to get mountpoint and sourcetype for %s: %s\n"),
1336 * If the mountpoint is inherited we don't need to
1338 * its mountpoint will be set accordingly.
1343 if (strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) == 0) {
1345 * If the mountpoint is set to 'legacy', its already
1353 * Else process dataset with explicitly set mountpoint.
1357 * Get this dataset's mountpoint relative to
1358 * the BE's mountpoint.
1360 if ((strncmp(mountpoint, ud->altroot,
1362 (mountpoint[strlen(ud->altroot)] == '/')) {
1364 zhp_mountpoint = mountpoint +
1367 /* Set this dataset's mountpoint value */
1373 "failed to set mountpoint for "
1393 "mountpoint sourcetype of %s is %d, skipping ...\n"),
1415 * a legacy mountpoint and an entry in the BE's vfstab.
1433 char mountpoint[MAXPATHLEN];
1436 /* Get this dataset's mountpoint property */
1440 "failed to get mountpoint for %s: %s\n"),
1448 * If mountpoint is legacy, try to get its mountpoint from this BE's
1454 mountpoint, sizeof (mountpoint), B_FALSE) != BE_SUCCESS) {
1465 "failed to add %s to fs list\n"), mountpoint);
1576 * a dataset path has an interim mountpoint for something
1639 * the BE mountpoint. If they are not mounted for the current
1655 char mountpoint[MAXPATHLEN];
1668 * If we didn't get a mountpoint from the zfs_is_mounted call,
1669 * get it from the mountpoint property.
1677 "failed to get mountpoint property\n"));
1686 (void) snprintf(mountpoint, sizeof (mountpoint), "%s%s",
1698 if (mount(zhp_mountpoint, mountpoint, mflag, MNTTYPE_LOFS,
1703 zhp_mountpoint, mountpoint, strerror(err));
1952 * it returns the mountpoint of that fs in the mountpoint
1954 * it returns the mountpoint with the altroot prepended.
1959 * mountpoint - pointer to buffer of where the mountpoint of
1961 * size_mp - size of mountpoint argument
1963 * mountpoint should be populated with the altroot
1972 get_mountpoint_from_vfstab(char *altroot, const char *fs, char *mountpoint,
1992 * Found entry for fs, grab its mountpoint.
1993 * If the flag to prepend the altroot into the mountpoint
1994 * is set, prepend it. Otherwise, just return the mountpoint.
1997 (void) snprintf(mountpoint, size_mp, "%s%s", altroot,
2000 (void) strlcpy(mountpoint, vp.vfs_mountp, size_mp);
2015 * children filesystems to check if its mountpoint is currently
2017 * removing altroot from the beginning of its mountpoint.
2020 * mountpoint isn't broken, and just happens to begin with
2023 * of this filesystem's mountpoint.
2039 char mountpoint[MAXPATHLEN];
2044 /* Get dataset's mountpoint and source values */
2045 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
2046 sizeof (mountpoint), &sourcetype, source, sizeof (source),
2049 "failed to get mountpoint and sourcetype for %s\n"),
2056 * If the mountpoint is not inherited and the mountpoint is not
2057 * 'legacy', this file system potentially needs its mountpoint
2061 strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) != 0) {
2064 * Check if this file system's current mountpoint is
2067 if (strncmp(mountpoint, altroot, strlen(altroot)) == 0 &&
2068 mountpoint[strlen(altroot)] == '/') {
2071 * Get this dataset's mountpoint relative to the
2074 zhp_mountpoint = mountpoint + strlen(altroot);
2076 /* Fix this dataset's mountpoint value */
2081 "failed to set mountpoint for %s to "
2121 char mountpoint[MAXPATHLEN];
2123 /* Get mountpoint property of dataset */
2124 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
2125 sizeof (mountpoint), NULL, NULL, 0, B_FALSE) != 0) {
2127 "get mountpoint property for %s: %s\n"), zfs_get_name(zhp),
2135 * mountpoint, zfs won't immediately try to mount it.
2145 /* Set mountpoint for BE's root filesystem */
2149 "set mountpoint of %s to %s: %s\n"),
2161 * Set this BE's root filesystem 'mountpoint' property
2165 mountpoint);
2176 * if the root dataset mountpoint should be left as 'legacy'
2178 * dataset with a mountpoint of '/', it sets the mountpoint
2195 char mountpoint[MAXPATHLEN];
2200 mountpoint, sizeof (mountpoint), B_FALSE) == BE_SUCCESS &&
2201 strcmp(mountpoint, "/") == 0) {
2223 * Set mountpoint for BE's root dataset back to '/', or 'legacy'
2229 "set mountpoint of %s to %s\n"), zfs_get_name(zhp),
2239 * Description: This function checks the mountpoint of an unmounted BE to make
2242 * mountpoint set for it. (This could happen if the system was
2247 * whose mountpoint needs to be checked.
2259 char mountpoint[MAXPATHLEN];
2263 * Record what this BE's root dataset mountpoint property is currently
2266 if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mountpoint,
2267 sizeof (mountpoint), NULL, NULL, 0, B_FALSE) != 0) {
2269 "mountpoint property of (%s): %s\n"), zfs_get_name(zhp),
2275 * If the root dataset mountpoint is set to 'legacy' or '/', we're okay.
2277 if (strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) == 0 ||
2278 strcmp(mountpoint, "/") == 0) {
2286 if (zfs_iter_filesystems(zhp, fix_mountpoint_callback, mountpoint)
2293 * will fix its mountpoint to correctly be either 'legacy' or '/'
2301 "make temporary mountpoint\n"));