svn commit: r232713 - projects/nfsv4.1-client/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Fri Mar 9 02:13:47 UTC 2012
Author: rmacklem
Date: Fri Mar 9 02:13:47 2012
New Revision: 232713
URL: http://svn.freebsd.org/changeset/base/232713
Log:
Add checks for callbacks working before either asking for layouts
or trying to use them. Callbacks are required for pNFS, so the
server can recall layouts.
Modified:
projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c
Modified: projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c Fri Mar 9 01:32:05 2012 (r232712)
+++ projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clrpcops.c Fri Mar 9 02:13:47 2012 (r232713)
@@ -322,7 +322,8 @@ else printf(" fhl=0\n");
}
/* Try and get a Layout, if it is supported. */
- if (error == 0 && NFSHASPNFS(nmp)) {
+ if (error == 0 && NFSHASPNFS(nmp) &&
+ nfscl_enablecallb != 0 && nfs_numnfscbd > 0) {
stateid.seqid = op->nfso_stateid.seqid;
stateid.other[0] = op->nfso_stateid.other[0];
stateid.other[1] = op->nfso_stateid.other[1];
@@ -5274,7 +5275,7 @@ nfscl_doiods(vnode_t vp, struct uio *uio
int eof, error;
void *lckp;
- if (!NFSHASPNFS(nmp))
+ if (!NFSHASPNFS(nmp) || nfscl_enablecallb == 0 || nfs_numnfscbd == 0)
return (EIO);
/* Now, get a reference cnt on the clientid for this mount. */
if (nfscl_getref(nmp) == 0)
More information about the svn-src-projects
mailing list