From owner-freebsd-current@FreeBSD.ORG Thu Feb 7 13:43:49 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 70F8CEAA for ; Thu, 7 Feb 2013 13:43:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BBF8AEFC for ; Thu, 7 Feb 2013 13:43:48 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA29282; Thu, 07 Feb 2013 15:43:37 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <5113AF89.4070303@FreeBSD.org> Date: Thu, 07 Feb 2013 15:43:37 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130206 Thunderbird/17.0.2 MIME-Version: 1.0 To: Rick Macklem Subject: Re: panic: LK_RETRY set with incompatible flags References: <1137922035.2777364.1360203187367.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <1137922035.2777364.1360203187367.JavaMail.root@erie.cs.uoguelph.ca> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 13:43:49 -0000 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. I am also not sure if doing actual zfs_zget only to check zp_gen != fid_gen or z_unlinked is required. Probably not. Sergey, could you please test Rick's patch? -- Andriy Gapon