From owner-svn-src-all@FreeBSD.ORG Thu Mar 21 11:32:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B40B170E; Thu, 21 Mar 2013 11:32:44 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from ffe8.ukr.net (ffe8.ukr.net [195.214.192.88]) by mx1.freebsd.org (Postfix) with ESMTP id 4825DF2C; Thu, 21 Mar 2013 11:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=ffe; h=Date:Message-Id:From:To:References:In-Reply-To:Subject:Cc:Content-Type:Content-Transfer-Encoding:MIME-Version; bh=9YUZtfTBr8eW694phQ7wFO6+IQQYeU/qiATmOuBKuJQ=; b=YQtyv6OQmUI8hhrUOXrXi31rapE9BdAfo8E5fsZkJx1Q5iz0AaeXnc/9r/lh3LKVhHEyd2lT0s6NizaqpMFEinWOgF7WeQVBvLsRbvFHkm70ITqwECOgkAVx6sm/JSNHtmjszTRzgPZn2OzV+J7Mh4tV95i1W37ywc8OM8FEDAQ=; Received: from mail by ffe8.ukr.net with local ID 1UIdjY-000O2l-Gs ; Thu, 21 Mar 2013 13:32:36 +0200 MIME-Version: 1.0 Subject: Re: svn commit: r248567 - head/sys/fs/nfsclient In-Reply-To: <201303210725.r2L7P8Bt075389@svn.freebsd.org> References: <201303210725.r2L7P8Bt075389@svn.freebsd.org> To: "Konstantin Belousov" From: "fidaj " X-Mailer: freemail.ukr.net 4.0 Message-Id: <85985.1363865556.9610245778278711296@ffe8.ukr.net> Date: Thu, 21 Mar 2013 13:32:36 +0200 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: binary Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Mar 2013 11:32:44 -0000 that commit breaks kernel built ... /usr/local/libexec/ccache/world/cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c /usr/src/sys/modules/nfscl/../../fs/nfsclient/nfs_clvfsops.c /usr/local/libexec/ccache/world/cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c /usr/src/sys/modules/nfscl/../../fs/nfsclient/nfs_clvnops.c ctfconvert -L VERSION -g nfs_diskless.o ctfconvert -L VERSION -g nfs_clkrpc.o ctfconvert -L VERSION -g nfs_clvfsops.o ctfconvert -L VERSION -g nfs_clsubs.o ctfconvert -L VERSION -g nfs_clrpcops.o ctfconvert -L VERSION -g nfs_clnfsiod.o ctfconvert -L VERSION -g nfs_clstate.o ctfconvert -L VERSION -g nfs_clbio.o ctfconvert -L VERSION -g nfs_clvnops.o ctfconvert -L VERSION -g nfs_clcomsubs.o ctfconvert -L VERSION -g nfs_clnode.o cc1: warnings being treated as errors /usr/src/sys/modules/nfscl/../../fs/nfsclient/nfs_clport.c: In function 'nfscl_loadattrcache': /usr/src/sys/modules/nfscl/../../fs/nfsclient/nfs_clport.c:364: warning: 'nsize' may be used uninitialized in this function *** [nfs_clport.o] Error code 1 1 error *** [all] Error code 2 1 error *** [modules-all] Error code 2 2 errors *** [buildkernel] Error code 2 1 error *** [buildkernel] Error code 2 Stop in /usr/src. Author: kib Date: Thu Mar 21 07:25:08 2013 New Revision: 248567 URL: http://svnweb.freebsd.org/changeset/base/248567 Log: Do not call vnode_pager_setsize() while a NFS node mutex is locked. vnode_pager_setsize() might sleep waiting for the page after EOF be unbusied. Call vnode_pager_setsize() both for the regular and directory vnodes. Reported by: mich Reviewed by: rmacklem Discussed with: avg, jhb MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Mar 21 07:04:17 2013 (r248566) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Mar 21 07:25:08 2013 (r248567) @@ -361,6 +361,8 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsnode *np; struct nfsmount *nmp; struct timespec mtime_save; + u_quad_t nsize; + int setnsize; /* * If v_type == VNON it is a new node, so fill in the v_type, @@ -418,6 +420,7 @@ nfscl_loadattrcache(struct vnode **vpp, } else vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; np->n_attrstamp = time_second; + setnsize = 0; if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { @@ -444,10 +447,13 @@ nfscl_loadattrcache(struct vnode **vpp, np->n_size = vap->va_size; np->n_flag |= NSIZECHANGED; } - vnode_pager_setsize(vp, np->n_size); } else { np->n_size = vap->va_size; } + if (vap->va_type == VREG || vap->va_type == VDIR) { + setnsize = 1; + nsize = vap->va_size; + } } /* * The following checks are added to prevent a race between (say) @@ -480,6 +486,8 @@ nfscl_loadattrcache(struct vnode **vpp, KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, 0); #endif NFSUNLOCKNODE(np); + if (setnsize) + vnode_pager_setsize(vp, nsize); return (0); }