From owner-freebsd-fs@FreeBSD.ORG Wed Aug 31 12:49:57 2011 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 E70591065672; Wed, 31 Aug 2011 12:49:56 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6B39E8FC21; Wed, 31 Aug 2011 12:49:55 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EAKssXk6DaFvO/2dsb2JhbABDFoQ2pHOBQAEBBAEjBFIFFAIOCgICDRkCWQaIBQSnNpILgSyEGIERBJMlkSM X-IronPort-AV: E=Sophos;i="4.68,307,1312171200"; d="scan'208";a="136074187" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 31 Aug 2011 08:49:55 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 3BFC2B3F27; Wed, 31 Aug 2011 08:49:55 -0400 (EDT) Date: Wed, 31 Aug 2011 08:49:55 -0400 (EDT) From: Rick Macklem To: George Liaskos Message-ID: <382461010.589453.1314794995233.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-fs@freebsd.org, Pawel Jakub Dawidek Subject: Re: NFSv4: After upgrade to 9 users can no longer list files. (sounds like a ZFS issue?) 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: Wed, 31 Aug 2011 12:49:57 -0000 George Liaskos wrote: > > You could try this patch and see what effect it has (applied to the > > server). It just disables the access check for readdir. > > --- nfs_nfsdport.c.sav2 2011-08-30 10:35:58.000000000 -0400 > > +++ nfs_nfsdport.c 2011-08-30 10:36:54.000000000 -0400 > > @@ -1838,10 +1838,12 @@ nfsrvd_readdirplus(struct nfsrv_descript > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nd->nd_repstat = =3D NFSERR_NOTDIR; > > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!nd->nd_repstat && cnt =3D=3D 0) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nd->nd_repstat = =3D NFSERR_TOOSMALL; > > +#ifdef notnow > > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!nd->nd_repstat) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nd->nd_repstat = =3D nfsvno_accchk(vp, VEXEC, > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nd= ->nd_cred, exp, p, NFSACCCHK_NOOVERRIDE, > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NF= SACCCHK_VPISLOCKED, NULL); > > +#endif > > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (nd->nd_repstat) { > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vput(vp); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (nd->nd_flag = & ND_NFSV3) > > > > This wouldn't be suitable for a production system, but whether or > > not it "fixes" the problem would give us an indication of where the > > problem is. > > > > Also, if you could clarify when your 8/stable was downloaded, > > whether > > your 9.0 upgrade was to vanilla Beta1 or ??? and details w.r.t. your > > ZFS setup, that might help. >=20 > I use svn, unfortunately i don't remember exactly when i moved from > 8.2 to stable. I synced with CURRENT last week and this issue > appeared, i did a second update to beta 2 [r225237] with the same > results. >=20 > The patch didn't make any difference. I downloaded an ISO with BETA-1 > and > made a VM installation, i was not able to reproduce this. >=20 > Updated one of the clients to r225237, setup some nfs exports on top > of ZFS > and ls does not work for non root users. I created a new pool on top > of a memory fs > to test this. >=20 > Next, i "downgraded" the server to BETA-1 [r224413] and everything is > back to normal. Ok, so it sounds like a post-Beta1 server issue. Did I get that correct? > So there's a bug which was introduced somewhere between BETA-1 && > BETA-2 :p >=20 Well, I can't imagine why this would matter, but you can try this patch, which fixes a problem introduced by r224810 where Lookup ".." no longer works. (It's at http://people.freebsd.org/~rmacklem/dotdot.patch, in case the white space gets munged.) Index: fs/nfsserver/nfs_nfsdport.c =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 --- fs/nfsserver/nfs_nfsdport.c=09(revision 225270) +++ fs/nfsserver/nfs_nfsdport.c=09(working copy) @@ -282,6 +282,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nam =20 =09*retdirp =3D NULL; =09cnp->cn_nameptr =3D cnp->cn_pnbuf; +=09ndp->ni_strictrelative =3D 0; =09/* =09 * Extract and set starting directory. =09 */ Index: nfsserver/nfs_serv.c =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 --- nfsserver/nfs_serv.c=09(revision 225270) +++ nfsserver/nfs_serv.c=09(working copy) @@ -157,6 +157,7 @@ ndclear(struct nameidata *nd) =09nd->ni_vp =3D NULL; =09nd->ni_dvp =3D NULL; =09nd->ni_startdir =3D NULL; +=09nd->ni_strictrelative =3D 0; } =20 /* rick > Thank you for your help! >=20 > Regards, > George