From owner-svn-src-all@FreeBSD.ORG Sat Sep 11 06:01:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 130FF1065672; Sat, 11 Sep 2010 06:01:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0368FC1B; Sat, 11 Sep 2010 06:01:16 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8B61BC3066584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Sep 2010 09:01:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8B61B6s096093; Sat, 11 Sep 2010 09:01:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8B61BF8096092; Sat, 11 Sep 2010 09:01:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 11 Sep 2010 09:01:11 +0300 From: Kostik Belousov To: Rick Macklem Message-ID: <20100911060111.GT2465@deviant.kiev.zoral.com.ua> References: <201009102318.o8ANIjUw098888@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u+FGODhbLwgAeSOU" Content-Disposition: inline In-Reply-To: <201009102318.o8ANIjUw098888@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212439 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 11 Sep 2010 06:01:17 -0000 --u+FGODhbLwgAeSOU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 10, 2010 at 11:18:45PM +0000, Rick Macklem wrote: > Author: rmacklem > Date: Fri Sep 10 23:18:45 2010 > New Revision: 212439 > URL: http://svn.freebsd.org/changeset/base/212439 >=20 > Log: > Fix the NFSVNO_CMPFH() macro in the experimental NFS server so > that it works correctly for ZFS file handles. It is possible to > have two ZFS file handles that differ only in the bytes in the > fid_reserved field of the generic "struct fid" and comparing the > bytes in fid_data didn't catch this case. This patch changes the > macro to compare all bytes of "struct fid". > =20 > Tested by: gull at gull.us > MFC after: 2 weeks >=20 > Modified: > head/sys/fs/nfs/nfsdport.h >=20 > Modified: head/sys/fs/nfs/nfsdport.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfs/nfsdport.h Fri Sep 10 23:15:05 2010 (r212438) > +++ head/sys/fs/nfs/nfsdport.h Fri Sep 10 23:18:45 2010 (r212439) > @@ -70,8 +70,7 @@ struct nfsexstuff { > #define NFSVNO_CMPFH(f1, f2) \ > ((f1)->fh_fsid.val[0] =3D=3D (f2)->fh_fsid.val[0] && \ > (f1)->fh_fsid.val[1] =3D=3D (f2)->fh_fsid.val[1] && \ > - !bcmp((f1)->fh_fid.fid_data, (f2)->fh_fid.fid_data, \ > - (f1)->fh_fid.fid_len)) > + bcmp(&(f1)->fh_fid, &(f2)->fh_fid, sizeof(struct fid)) =3D=3D 0) > =20 > #define NFSLOCKHASH(f) \ > (&nfslockhash[(*((u_int32_t *)((f)->fh_fid.fid_data))) % NFSLOCKHASHSIZ= E]) Then, fid_reserved is no more reserved ? Should we rename it ? Comment for fid_reserved about longword alignment is wrong. --u+FGODhbLwgAeSOU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyLGycACgkQC3+MBN1Mb4i+BQCfTDnOn+fFfFwYt8t66HQ5Wwoh 36cAniK/w2BOdH14x6+Dod7oylOhTmaL =9613 -----END PGP SIGNATURE----- --u+FGODhbLwgAeSOU--