Instantiate `nfs_mount_type' in a standard file so that it is present
when nfs is an LKM. Declare it in a header file. Don't forget to use it in non-Lite2 code. Initialize it to -1 instead of to 0, since 0 will soon be the mount type number for the first vfs loaded. NetBSD uses strcmp() to avoid this ugly global.
This commit is contained in:
parent
69beb1913e
commit
500b04a257
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38866
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.160 1998/08/12 20:17:42 bde Exp $
|
||||
* $Id: vfs_subr.c,v 1.161 1998/08/29 13:13:10 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -119,6 +119,7 @@ struct mntlist mountlist; /* mounted filesystem list */
|
||||
struct simplelock mountlist_slock;
|
||||
static struct simplelock mntid_slock;
|
||||
struct simplelock mntvnode_slock;
|
||||
int nfs_mount_type = -1;
|
||||
static struct simplelock vnode_free_list_slock;
|
||||
static struct simplelock spechash_slock;
|
||||
struct nfs_public nfs_pub; /* publicly exported FS */
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.160 1998/08/12 20:17:42 bde Exp $
|
||||
* $Id: vfs_subr.c,v 1.161 1998/08/29 13:13:10 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -119,6 +119,7 @@ struct mntlist mountlist; /* mounted filesystem list */
|
||||
struct simplelock mountlist_slock;
|
||||
static struct simplelock mntid_slock;
|
||||
struct simplelock mntvnode_slock;
|
||||
int nfs_mount_type = -1;
|
||||
static struct simplelock vnode_free_list_slock;
|
||||
static struct simplelock spechash_slock;
|
||||
struct nfs_public nfs_pub; /* publicly exported FS */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.62 1998/06/14 15:52:00 bde Exp $
|
||||
* $Id: nfs_subs.c,v 1.63 1998/06/21 12:50:12 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -98,7 +98,6 @@ enum vtype nv3tov_type[8]= {
|
||||
VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO
|
||||
};
|
||||
|
||||
int nfs_mount_type;
|
||||
int nfs_ticks;
|
||||
|
||||
struct nfs_reqq nfs_reqq;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_nqlease.c 8.9 (Berkeley) 5/20/95
|
||||
* $Id: nfs_nqlease.c,v 1.36 1998/05/31 17:27:46 peter Exp $
|
||||
* $Id: nfs_nqlease.c,v 1.37 1998/05/31 20:08:52 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -137,7 +137,6 @@ extern nfstype nfsv3_type[9];
|
||||
extern struct nfssvc_sock *nfs_udpsock, *nfs_cltpsock;
|
||||
extern int nfsd_waiting;
|
||||
extern struct nfsstats nfsstats;
|
||||
extern int nfs_mount_type;
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.62 1998/06/14 15:52:00 bde Exp $
|
||||
* $Id: nfs_subs.c,v 1.63 1998/06/21 12:50:12 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -98,7 +98,6 @@ enum vtype nv3tov_type[8]= {
|
||||
VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO
|
||||
};
|
||||
|
||||
int nfs_mount_type;
|
||||
int nfs_ticks;
|
||||
|
||||
struct nfs_reqq nfs_reqq;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.62 1998/06/14 15:52:00 bde Exp $
|
||||
* $Id: nfs_subs.c,v 1.63 1998/06/21 12:50:12 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -98,7 +98,6 @@ enum vtype nv3tov_type[8]= {
|
||||
VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO
|
||||
};
|
||||
|
||||
int nfs_mount_type;
|
||||
int nfs_ticks;
|
||||
|
||||
struct nfs_reqq nfs_reqq;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.62 1998/06/14 15:52:00 bde Exp $
|
||||
* $Id: nfs_subs.c,v 1.63 1998/06/21 12:50:12 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -98,7 +98,6 @@ enum vtype nv3tov_type[8]= {
|
||||
VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO
|
||||
};
|
||||
|
||||
int nfs_mount_type;
|
||||
int nfs_ticks;
|
||||
|
||||
struct nfs_reqq nfs_reqq;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)mount.h 8.21 (Berkeley) 5/20/95
|
||||
* $Id: mount.h,v 1.64 1998/09/02 17:03:49 bde Exp $
|
||||
* $Id: mount.h,v 1.65 1998/09/02 17:25:51 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_MOUNT_H_
|
||||
@ -326,6 +326,7 @@ struct ovfsconf {
|
||||
MALLOC_DECLARE(M_MOUNT);
|
||||
#endif
|
||||
extern int maxvfsconf; /* highest defined filesystem type */
|
||||
extern int nfs_mount_type; /* vfc_typenum for nfs, or -1 */
|
||||
extern struct vfsconf *vfsconf; /* head of list of filesystem types */
|
||||
|
||||
/*
|
||||
|
@ -38,7 +38,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
|
||||
* $Id: vnode_pager.c,v 1.96 1998/08/25 13:47:37 luoqi Exp $
|
||||
* $Id: vnode_pager.c,v 1.97 1998/09/04 08:06:57 dfr Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -603,8 +603,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
|
||||
* blocksize, but it can handle large reads itself.
|
||||
*/
|
||||
} else if ((PAGE_SIZE / bsize) > 1 &&
|
||||
(vp->v_mount->mnt_stat.f_type != MOUNT_NFS)) {
|
||||
|
||||
(vp->v_mount->mnt_stat.f_type != nfs_mount_type)) {
|
||||
for (i = 0; i < count; i++) {
|
||||
if (i != reqpage) {
|
||||
vnode_pager_freepage(m[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user