Anyone seeing any NFS lockups/weirdness with latest (ish)
current??
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Oct 24 04:30:27 PDT 2003
In message <20031024111903.GA2554 at stack.nl>, Marc Olzheim writes:
>On Thu, Oct 23, 2003 at 10:53:29PM +0200, Soren Schmidt wrote:
>> Yes, NFS is locking up here as well between current machines thats been
>> updated in the last 24 hours...
>
>In kernels since about october 17th, until upto an hour ago, it's still
>reproducable here as well..
You may want to try this patch, Kirk sent it to me in response to a
case where my NFS-server hung during snapshot processing.
I have only just managed to put it on my server so I don't know if
it solves the problem or not.
Poul-Henning
Index: nfs_serv.c
===================================================================
RCS file: /home/ncvs/src/sys/nfsserver/nfs_serv.c,v
retrieving revision 1.136
diff -u -r1.136 nfs_serv.c
--- nfs_serv.c 24 Jun 2003 19:04:26 -0000 1.136
+++ nfs_serv.c 24 Oct 2003 11:14:56 -0000
@@ -310,13 +310,7 @@
error = ESTALE;
goto out;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto out;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
VATTR_NULL(vap);
if (v3) {
nfsm_srvsattr(vap);
@@ -1010,13 +1004,7 @@
error = ESTALE;
goto ereply;
}
- if ((error = VFS_FHTOVP(mntp, &fhp->fh_fid, &vp)) != 0) {
- mntp = NULL;
- goto ereply;
- }
- (void) vn_start_write(vp, &mntp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mntp, V_WAIT);
if (v3) {
tl = nfsm_dissect(u_int32_t *, 5 * NFSX_UNSIGNED);
off = fxdr_hyper(tl);
@@ -1588,7 +1576,6 @@
u_quad_t tempsize;
u_char cverf[NFSX_V3CREATEVERF];
struct mount *mp = NULL;
- struct vnode *vp;
nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
#ifndef nolint
@@ -1602,12 +1589,7 @@
error = ESTALE;
goto ereply;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto ereply;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvnamesiz(len);
nd.ni_cnd.cn_cred = cred;
@@ -1891,13 +1873,7 @@
error = ESTALE;
goto ereply;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto ereply;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvnamesiz(len);
nd.ni_cnd.cn_cred = cred;
@@ -2064,7 +2040,6 @@
nfsfh_t nfh;
fhandle_t *fhp;
struct mount *mp = NULL;
- struct vnode *vp;
nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
ndclear(&nd);
@@ -2075,13 +2050,7 @@
error = ESTALE;
goto ereply;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto ereply;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvnamesiz(len);
nd.ni_cnd.cn_cred = cred;
@@ -2178,7 +2147,6 @@
fhandle_t *ffhp, *tfhp;
uid_t saved_uid;
struct mount *mp = NULL;
- struct vnode *vp;
nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
#ifndef nolint
@@ -2199,13 +2167,7 @@
error = ESTALE;
goto out1;
}
- if ((error = VFS_FHTOVP(mp, &ffhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto out1;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvnamesiz(len);
/*
* Remember our original uid so that we can reset cr_uid before
@@ -2421,13 +2383,7 @@
error = ESTALE;
goto ereply;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto ereply;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvmtofh(dfhp);
nfsm_srvnamesiz(len);
@@ -2559,7 +2515,6 @@
nfsfh_t nfh;
fhandle_t *fhp;
struct mount *mp = NULL;
- struct vnode *vp;
nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
ndclear(&nd);
@@ -2570,13 +2525,7 @@
error = ESTALE;
goto out;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto out;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvnamesiz(len);
nd.ni_cnd.cn_cred = cred;
nd.ni_cnd.cn_nameiop = CREATE;
@@ -2738,7 +2687,6 @@
nfsfh_t nfh;
fhandle_t *fhp;
struct mount *mp = NULL;
- struct vnode *vp;
nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
ndclear(&nd);
@@ -2749,13 +2697,7 @@
error = ESTALE;
goto out;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto out;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvnamesiz(len);
nd.ni_cnd.cn_cred = cred;
nd.ni_cnd.cn_nameiop = CREATE;
@@ -2908,13 +2850,7 @@
error = ESTALE;
goto out;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto out;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
nfsm_srvnamesiz(len);
nd.ni_cnd.cn_cred = cred;
nd.ni_cnd.cn_nameiop = DELETE;
@@ -3697,13 +3633,7 @@
error = ESTALE;
goto ereply;
}
- if ((error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp)) != 0) {
- mp = NULL;
- goto ereply;
- }
- (void) vn_start_write(vp, &mp, V_WAIT);
- vput(vp);
- vp = NULL;
+ (void) vn_start_write(NULL, &mp, V_WAIT);
tl = nfsm_dissect(u_int32_t *, 3 * NFSX_UNSIGNED);
/*
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list