From owner-freebsd-current@FreeBSD.ORG Fri Oct 24 04:30:27 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1444916A4B3 for ; Fri, 24 Oct 2003 04:30:27 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD2A443FDD for ; Fri, 24 Oct 2003 04:30:25 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id h9OBUIax007955; Fri, 24 Oct 2003 13:30:18 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Marc Olzheim From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 24 Oct 2003 13:19:03 +0200." <20031024111903.GA2554@stack.nl> Date: Fri, 24 Oct 2003 13:30:18 +0200 Message-ID: <7954.1066995018@critter.freebsd.dk> cc: Soren Schmidt cc: current@freebsd.org Subject: Re: Anyone seeing any NFS lockups/weirdness with latest (ish) current?? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2003 11:30:27 -0000 In message <20031024111903.GA2554@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@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.