From owner-freebsd-fs@FreeBSD.ORG Fri Jun 11 06:03:50 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58AE4106567C for ; Fri, 11 Jun 2010 06:03:50 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A66B78FC14 for ; Fri, 11 Jun 2010 06:03:49 +0000 (UTC) Received: by bwz2 with SMTP id 2so281077bwz.13 for ; Thu, 10 Jun 2010 23:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:organization :date:message-id:user-agent:mime-version:content-type; bh=jJGd4KXkRNjxRw7LniXf+XPGfrJorXOofPJIxd9Jktg=; b=Wgn3s0fT+RaCkNgnQNlPbYNjJGOtNOlZx7t65p1hoCtcjwgVHojNZPNdHxkwh7kS7c E/6uhWGvHuiBmQfu8jjUzyNE7SXq0uC9fATJwZ6vinrlsEupHqJS2ZjstTaY3cTvMZEx z1kloN60pnbpzqIV5qmprXDCIX1VeqXU4nJMs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:organization:date:message-id:user-agent :mime-version:content-type; b=Cy36o/FtDPQ1YdH7o1cYSpPl3r0LKFZEJOyQ0Q91l+b5BVfbCCKyj2g/thNPPVVmcy GJ1s02Hen0VDSs1lH+B1oECreRTRr4K2at6a7w9Ws9ayKs940Hy2pazo0Hjx7NDWNMmx RPVsRacmFSdrCRM2xurXItQovik9Wrhre7gdE= Received: by 10.204.81.84 with SMTP id w20mr919417bkk.81.1276236227869; Thu, 10 Jun 2010 23:03:47 -0700 (PDT) Received: from localhost (ua1.etadirect.net [91.198.140.16]) by mx.google.com with ESMTPS id z17sm3441551bkx.6.2010.06.10.23.03.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Jun 2010 23:03:47 -0700 (PDT) From: Mikolaj Golub To: freebsd-fs@freebsd.org Organization: TOA Ukraine Date: Fri, 11 Jun 2010 09:03:44 +0300 Message-ID: <86mxv22ji7.fsf@zhuzha.ua1> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: '#ifndef DIAGNOSTIC' in nfsclient code looks like a typo X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 06:03:50 -0000 --=-=-= Hi: '#ifndef DIAGNOSTIC' in sys/nfsclient/nfs_vnops.c and sys/fs/nfsclient/nfs_clvnops.c looks like a typo and '#ifdef' should be used instead (see the attached patch). -- Mikolaj Golub --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nfsclient.ifdef_DIAGNOSTIC.patch Index: sys/nfsclient/nfs_vnops.c =================================================================== --- sys/nfsclient/nfs_vnops.c (revision 209021) +++ sys/nfsclient/nfs_vnops.c (working copy) @@ -1348,7 +1348,7 @@ nfs_writerpc(struct vnode *vp, struct uio *uiop, s int v3 = NFS_ISV3(vp), committed = NFSV3WRITE_FILESYNC; int wsize; -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if (uiop->uio_iovcnt != 1) panic("nfs: writerpc iovcnt > 1"); #endif @@ -1708,7 +1708,7 @@ nfs_remove(struct vop_remove_args *ap) int error = 0; struct vattr vattr; -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if ((cnp->cn_flags & HASBUF) == 0) panic("nfs_remove: no name"); if (vrefcnt(vp) < 1) @@ -1814,7 +1814,7 @@ nfs_rename(struct vop_rename_args *ap) struct componentname *fcnp = ap->a_fcnp; int error; -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if ((tcnp->cn_flags & HASBUF) == 0 || (fcnp->cn_flags & HASBUF) == 0) panic("nfs_rename: no name"); @@ -2277,7 +2277,7 @@ nfs_readdirrpc(struct vnode *vp, struct uio *uiop, int attrflag; int v3 = NFS_ISV3(vp); -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || (uiop->uio_resid & (DIRBLKSIZ - 1))) panic("nfs readdirrpc bad uio"); @@ -2482,7 +2482,7 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *u #ifndef nolint dp = NULL; #endif -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || (uiop->uio_resid & (DIRBLKSIZ - 1))) panic("nfs readdirplusrpc bad uio"); @@ -2752,7 +2752,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *v cache_purge(dvp); np = VTONFS(vp); -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if (vp->v_type == VDIR) panic("nfs: sillyrename dir"); #endif Index: sys/fs/nfsclient/nfs_clvnops.c =================================================================== --- sys/fs/nfsclient/nfs_clvnops.c (revision 209021) +++ sys/fs/nfsclient/nfs_clvnops.c (working copy) @@ -1564,7 +1564,7 @@ nfs_remove(struct vop_remove_args *ap) int error = 0; struct vattr vattr; -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if ((cnp->cn_flags & HASBUF) == 0) panic("nfs_remove: no name"); if (vrefcnt(vp) < 1) @@ -1676,7 +1676,7 @@ nfs_rename(struct vop_rename_args *ap) struct nfsv4node *newv4 = NULL; int error; -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if ((tcnp->cn_flags & HASBUF) == 0 || (fcnp->cn_flags & HASBUF) == 0) panic("nfs_rename: no name"); @@ -2137,7 +2137,7 @@ ncl_readdirrpc(struct vnode *vp, struct uio *uiop, struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, eof, attrflag; -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || (uiop->uio_resid & (DIRBLKSIZ - 1))) panic("nfs readdirrpc bad uio"); @@ -2198,7 +2198,7 @@ ncl_readdirplusrpc(struct vnode *vp, struct uio *u struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, attrflag, eof; -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if (uiop->uio_iovcnt != 1 || (uiop->uio_offset & (DIRBLKSIZ - 1)) || (uiop->uio_resid & (DIRBLKSIZ - 1))) panic("nfs readdirplusrpc bad uio"); @@ -2264,7 +2264,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *v cache_purge(dvp); np = VTONFS(vp); -#ifndef DIAGNOSTIC +#ifdef DIAGNOSTIC if (vp->v_type == VDIR) panic("nfs: sillyrename dir"); #endif --=-=-=--