Date: Tue, 10 Apr 2012 01:26:58 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r234076 - in projects/nfsv4.1-client/sys: fs/nfs fs/nfsclient nfsclient Message-ID: <201204100126.q3A1QwN6091241@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Tue Apr 10 01:26:58 2012 New Revision: 234076 URL: http://svn.freebsd.org/changeset/base/234076 Log: Add a "pnfs" mount option, so that pnfs support won't be enabled by default. This is needed because pnfs support will be experimental for quite a while. Or, it may crash when enabled, if you prefer. Modified: projects/nfsv4.1-client/sys/fs/nfs/nfsport.h projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clvfsops.c projects/nfsv4.1-client/sys/nfsclient/nfsargs.h Modified: projects/nfsv4.1-client/sys/fs/nfs/nfsport.h ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfs/nfsport.h Tue Apr 10 01:20:32 2012 (r234075) +++ projects/nfsv4.1-client/sys/fs/nfs/nfsport.h Tue Apr 10 01:26:58 2012 (r234076) @@ -857,6 +857,7 @@ void newnfs_realign(struct mbuf **); #define NFSHASPRIVACY(n) ((n)->nm_flag & NFSMNT_PRIVACY) #define NFSSETWRITEVERF(n) ((n)->nm_state |= NFSSTA_HASWRITEVERF) #define NFSSETHASSETFSID(n) ((n)->nm_state |= NFSSTA_HASSETFSID) +#define NFSHASPNFSOPT(n) ((n)->nm_flag & NFSMNT_PNFS) #define NFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS) /* Modified: projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c Tue Apr 10 01:20:32 2012 (r234075) +++ projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c Tue Apr 10 01:26:58 2012 (r234076) @@ -4421,7 +4421,8 @@ printf("servlen=%d\n", len); fxdr_unsigned(uint32_t, *tl++); v41flags = fxdr_unsigned(uint32_t, *tl); printf("v41fl=0x%x\n", v41flags); - if ((v41flags & NFSV4EXCH_USEPNFSMDS) != 0) { + if ((v41flags & NFSV4EXCH_USEPNFSMDS) != 0 && + NFSHASPNFSOPT(nmp)) { NFSLOCKMNT(nmp); nmp->nm_state |= NFSSTA_PNFS; NFSUNLOCKMNT(nmp); Modified: projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clvfsops.c Tue Apr 10 01:20:32 2012 (r234075) +++ projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clvfsops.c Tue Apr 10 01:26:58 2012 (r234076) @@ -717,8 +717,8 @@ static const char *nfs_opts[] = { "from" "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport", "readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", - "principal", "nfsv4", "gssname", "allgssname", "dirpath", - "nametimeo", "negnametimeo", "nocto", "wcommitsize", "minvers", + "principal", "nfsv4", "gssname", "allgssname", "dirpath", "minvers", + "nametimeo", "negnametimeo", "nocto", "pnfs", "wcommitsize", NULL }; /* @@ -839,6 +839,8 @@ nfs_mount(struct mount *mp) args.flags |= NFSMNT_ALLGSSNAME; if (vfs_getopt(mp->mnt_optnew, "nocto", NULL, NULL) == 0) args.flags |= NFSMNT_NOCTO; + if (vfs_getopt(mp->mnt_optnew, "pnfs", NULL, NULL) == 0) + args.flags |= NFSMNT_PNFS; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { if (opt == NULL) { vfs_mount_error(mp, "illegal readdirsize"); Modified: projects/nfsv4.1-client/sys/nfsclient/nfsargs.h ============================================================================== --- projects/nfsv4.1-client/sys/nfsclient/nfsargs.h Tue Apr 10 01:20:32 2012 (r234075) +++ projects/nfsv4.1-client/sys/nfsclient/nfsargs.h Tue Apr 10 01:26:58 2012 (r234076) @@ -98,5 +98,6 @@ struct nfs_args { #define NFSMNT_ALLGSSNAME 0x08000000 /* Use principal for all accesses */ #define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */ #define NFSMNT_NOCTO 0x20000000 /* Don't flush attrcache on open */ +#define NFSMNT_PNFS 0x40000000 /* Enable pNFS support */ #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204100126.q3A1QwN6091241>