Print this page
6198 Let's EOL cachefs
*** 20,29 ****
--- 20,30 ----
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*/
/*
* System includes
*** 103,117 ****
* 1024 chars is defined in the mnttab.h header as the max size of an entry.
*/
#define HOST_NM_LN MNT_LINE_MAX
- /* These cachefs definitions should be in mntent.h. Maybe some day. */
- #define MNTTYPE_CFS "cachefs"
- #define MNTOPT_BACKFSTYPE "backfstype"
- #define MNTTYPE_AUTO "autofs"
-
/*
* Utilities for getting filesystem information from the mount table.
*
* Note: vanilla SVr4 code (pkginstall/dockspace.c) used the output from
* popen() on the "/etc/mount" command. However, we need to get more
--- 104,113 ----
*** 225,235 ****
}
if (n < fs_tab_used) {
(void) strcpy(hostname, fs_tab[n]->remote_name);
if ((host_end = strchr(hostname, ':')) == NULL) {
! if ((strcmp(fs_tab[n]->fstype, MNTTYPE_AUTO)) == NULL)
return ("automounter");
else
return (fs_tab[n]->fstype);
} else {
*host_end = '\0';
--- 221,231 ----
}
if (n < fs_tab_used) {
(void) strcpy(hostname, fs_tab[n]->remote_name);
if ((host_end = strchr(hostname, ':')) == NULL) {
! if ((strcmp(fs_tab[n]->fstype, MNTTYPE_AUTOFS)) == NULL)
return ("automounter");
else
return (fs_tab[n]->fstype);
} else {
*host_end = '\0';
*** 712,722 ****
* Testing the type is cheap; finding the hostname is not.
* At this point, we're using the REAL mnttab; since we're not
* allowed to mount ourself with "NFS", "NFS" must be remote.
* The automount will translate "nfs:self" to a lofs mount.
*/
! if (strcmp(mt->mnt_fstype, MNTTYPE_AUTO) == 0 ||
strcmp(mt->mnt_fstype, MNTTYPE_NFS) == 0 ||
is_remote_src(mt->mnt_special) == REAL_REMOTE)
nfte->remote = 1;
else
nfte->remote = 0;
--- 708,718 ----
* Testing the type is cheap; finding the hostname is not.
* At this point, we're using the REAL mnttab; since we're not
* allowed to mount ourself with "NFS", "NFS" must be remote.
* The automount will translate "nfs:self" to a lofs mount.
*/
! if (strcmp(mt->mnt_fstype, MNTTYPE_AUTOFS) == 0 ||
strcmp(mt->mnt_fstype, MNTTYPE_NFS) == 0 ||
is_remote_src(mt->mnt_special) == REAL_REMOTE)
nfte->remote = 1;
else
nfte->remote = 0;
*** 961,973 ****
}
/*
* We also skip the entry if the vfs_special
* path and the client_path are the same.
- * There's no need to mount it, it's just a
- * cachefs optimization that mounts a
- * directory over itself from this server.
*/
if ((is_remote == SELF_SERVE) &&
strcmp(path_part(vfs->vfs_special),
client_mountp) == 0)
continue;
--- 957,966 ----