From owner-freebsd-current@FreeBSD.ORG Thu Feb 7 15:37:02 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 98BCE295; Thu, 7 Feb 2013 15:37:02 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by mx1.freebsd.org (Postfix) with ESMTP id 09B768B6; Thu, 7 Feb 2013 15:37:01 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id ez12so3057607wid.0 for ; Thu, 07 Feb 2013 07:37:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Xcm+HYzJKTba8U2Jc1g4rKNnfrYfLBOpr8V7xwquC04=; b=ltwwrH5K9mdSs0/2VkM13JXOl5VplqQNCXSbZUFfBNBo94BC8tz+ZgwbZVfTiCwNKd XdwlBLsGEt8SCO/s3w3hUFDpq4I18K3SN2qRghyjiwTHTWYRjoM8L+RqEcg6STF6DwYK yxVl8WtxWP9KQ5BC+DCtNuZk3hB2rZmUuZF5rAaX1quTt9eZw05hkMFXquj/i1mbp/7g dWUBiclw6mxXSTNtwQsw7fSy7+uVJEGsY6kXLT6gpDNnx5HAGbOERsOI0sOuo0lQo9bQ AgsFxgRKtLuqCzw76kCysfyhUVKOKhhdGPuLyeowIPO9kdv3hy+CTNb7PV2W4swjIPiq RbkA== MIME-Version: 1.0 X-Received: by 10.194.171.198 with SMTP id aw6mr3759489wjc.3.1360251406078; Thu, 07 Feb 2013 07:36:46 -0800 (PST) Received: by 10.195.12.163 with HTTP; Thu, 7 Feb 2013 07:36:45 -0800 (PST) In-Reply-To: <5113AF89.4070303@FreeBSD.org> References: <1137922035.2777364.1360203187367.JavaMail.root@erie.cs.uoguelph.ca> <5113AF89.4070303@FreeBSD.org> Date: Thu, 7 Feb 2013 18:36:45 +0300 Message-ID: Subject: Re: panic: LK_RETRY set with incompatible flags From: Sergey Kandaurov To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Cc: Konstantin Belousov , Rick Macklem , 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:37:02 -0000 On 7 February 2013 17:43, 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. > 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? Hi Rick, Andriy. I tested the patch without the (*vpp != dvp) change. It works well. It's something unrelated but when doing ls -l on server (patched) and client (unpatched) sides, I found some inconsistency in returned stats. Or more precisely: NFS server # stat -s /pool1/user1000/.zfs/shares/.. st_dev=2050684725 st_ino=1 st_mode=040555 st_nlink=4 st_uid=0 st_gid=0 st_rdev=0 st_size=4 st_atime=1360251211 st_mtime=1359551493 st_ctime=1359551493 st_birthtime=1359551493 st_blksize=4096 st_blocks=0 st_flags=0 NFS client # stat -s /home/user1000/.zfs/shares/.. st_dev=2050684725 st_ino=7 st_mode=040555 st_nlink=2 st_uid=0 st_gid=0 st_rdev=1377468712 st_size=2 st_atime=1360251104 st_mtime=1359551493 st_ctime=1359551493 st_birthtime=-1 st_blksize=4096 st_blocks=3 st_flags=0 JFYI. -- wbr, pluknet