From owner-freebsd-current@FreeBSD.ORG Thu Feb 7 15:04:26 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 15F3E1DD; Thu, 7 Feb 2013 15:04:26 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id BFD2163C; Thu, 7 Feb 2013 15:04:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAGnBE1GDaFvO/2dsb2JhbABFhkm6M3OCHwEBAQMBAQEBIAQnIAsFFg4KAgINGQIpAQkmBggHBAEcBIdqBgysIpJXgSOMAYMlgRMDiGaLCYIygR2IOIZ9gx6BUTU X-IronPort-AV: E=Sophos;i="4.84,622,1355115600"; d="scan'208";a="12895953" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu.net.uoguelph.ca with ESMTP; 07 Feb 2013 10:04:24 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 9901EB3F43; Thu, 7 Feb 2013 10:04:24 -0500 (EST) Date: Thu, 7 Feb 2013 10:04:24 -0500 (EST) From: Rick Macklem To: Andriy Gapon Message-ID: <236652418.2788560.1360249464612.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <5113AF89.4070303@FreeBSD.org> Subject: Re: panic: LK_RETRY set with incompatible flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Konstantin Belousov , Sergey Kandaurov , FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 07 Feb 2013 15:04:26 -0000 Andriy Gapon wrote: > on 07/02/2013 04:13 Rick Macklem said the following: > > Andriy Gapon wrote: > >> on 06/02/2013 17:15 Rick Macklem said the following: > >>> Well, zfs_vget() returns EOPNOTSUPP for .zfs, so the NFS server > >>> knows to > >>> switch over to using VOP_LOOKUP(). If the .zfs/snapshot and > >>> .zfs/share > >>> do the same thing, that should be fine, at least for the NFS > >>> server, > >>> I think. > >> > >> Ah, right, but again this is done only for .zfs and .zfs/snapshot. > >> .zfs/shares is not special-cased and thus is problematic here too > >> in > >> the same > >> fashion as zfs_fhtovp. > >> > > Well, I have no way to test this, but maybe the attached patch is a > > start in the right direction. > > > > Maybe you can take a look at it and/or Sergey could test it? > > > > Thanks for all your help with this, rick > > Rick, > the patch looks 99% percent good to me :-) > I am not sure if I am overly paranoid here, but I would add a check > for > zfsvfs->z_shares_dir being non-zero before comparing anything with it. Yes, I think checking that it is non-zero sounds like a good idea. > I am also not sure if doing actual zfs_zget only to check zp_gen != > fid_gen or > z_unlinked is required. Probably not. > I don't think so, either. At least w.r.t. NFS, all the generation # does is check for a recycled i-node. The other thing I wondered about is "can zfsvfs->z_shares_dir ever not fit in 32bits?". I notice it is a uint64_t, but ino_t is still 32bits for FreeBSD. If it didn't fit in 32bits, the check in zfs_vget() wouldn't work. (I have a hunch that, for now, the ZFS code doesn't exceed 32bit fids, but haven't looked at the code to try and see. I'll take a closer look at that, too.) Thanks for looking at it, rick > Sergey, > could you please test Rick's patch? > > -- > Andriy Gapon > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"