Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6046338rwd; Wed, 24 May 2023 10:02:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5anWgR1JTkWfNLQZTrB0x8zpZ6sbJ4r40sP3FfE/9ZEEpIBlc99Txz1OvSoma7+0/qqeth X-Received: by 2002:a05:6a00:2d9a:b0:63d:641f:5048 with SMTP id fb26-20020a056a002d9a00b0063d641f5048mr4150601pfb.16.1684947735076; Wed, 24 May 2023 10:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684947735; cv=none; d=google.com; s=arc-20160816; b=GqYWdqhCTJlIl6MfTb6AhpDHIuAzVjn6hQDrfdkq6diGqhis/KqHZzSJlFUnPcidU8 P/yphxphOCPJQFL5oLxmgZEZ9VFPg/OqpeGywH5Z4KZmw05vSbfc9UyW1Ldl9abR3Qqu ZHZETSX1HONQF2IPU6bQ76oKRkAXWxC8b9YsPVbtJ80/ltVzX27HfLz3vL3VatPprTcx bNHMgBuR0w4AZL6uePMHwLhI51f/UJj1UgRft/k5Jh3o5bZ5ycZKj0V+Q9BUYAe4Oity zPLQmwFBiVJ3mmohZsAniseW9rp1soAy2HGu2QCfEqaUuINBbYSSvMwvNKhgc197hg3n 1nKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=sGxhTK9X0YjqTCyycyn24FalMzlbamwdb0oSsXWIbqA=; b=tFOI+zIa6eJlWmGZ5wP52d1bFn283qs54ytezc/d1fqN62JgSA3/60GFvOgf1XsVQH eIWgha4NN9qIMKl+yXuFdHuWQzxw/H2XaBTULU6F6tVlCgb6LlwFBDyvaKqz1Uy3nbeD Dp82mdIFomF1ODzCpEhDC/sYj3E/NumQO1DN9GvCE0MLiLYNT327McX4IDVezIPBUrTe TYOTWJMjhNpy+6ObVzvvpRPUIJaBzhncAT549qMJCgYUBummKKifLVH1PACudjqVBDBB ZwkqfChW75qLSOEE3fWy/B+wGoi1CnHZeD/B76mrgtLU9KgIc+69Zu3M1tgLFFyTBAfl lS+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NA8pjEs+; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv4-20020a632e04000000b0052c40645e07si964095pgb.57.2023.05.24.10.01.22; Wed, 24 May 2023 10:02:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NA8pjEs+; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229921AbjEXQzz (ORCPT + 99 others); Wed, 24 May 2023 12:55:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235457AbjEXQzp (ORCPT ); Wed, 24 May 2023 12:55:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDDF7123; Wed, 24 May 2023 09:55:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5AD3963F57; Wed, 24 May 2023 16:55:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5178FC433EF; Wed, 24 May 2023 16:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684947343; bh=sGxhTK9X0YjqTCyycyn24FalMzlbamwdb0oSsXWIbqA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=NA8pjEs+Q/z/3/JXcw+JZ2UuvO54Ux+k4fI8a8Sfh3dGZmgAAP4xFNsVjL9F01Lu0 plgazzcantSpxOvUZTODWad5/L530OIPbDrB+vlk71GjNQ5Hv1pA8mI2k1FiP2WA/d yKeZAhBW+AMR1qommnNTfQNoHrDSeDOMmKE/zHu6zhAidWLplOSFsX9gTIeQzzOKMm fnm7jynnYoxcvyeIx/rVrs28+txYho1gdvkmSIJJxNR+WuHL0l2OTwThmzQOLwu+Bi htF2iYZVYJ155oXgr1AwwashhfRQw46mjhQW98mbzKo72FRD19nLTNWl5dh86dyElN 5LHNxh5KgZG8w== Message-ID: Subject: Re: [PATCH v5 3/3] locks: allow support for write delegation From: Jeff Layton To: Chuck Lever III Cc: Dai Ngo , Linux NFS Mailing List , "linux-fsdevel@vger.kernel.org" Date: Wed, 24 May 2023 12:55:41 -0400 In-Reply-To: References: <1684799560-31663-1-git-send-email-dai.ngo@oracle.com> <1684799560-31663-4-git-send-email-dai.ngo@oracle.com> <32e880c5f66ce8a6f343c01416fcc8b791cc1302.camel@kernel.org> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.1 (3.48.1-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, 2023-05-24 at 15:09 +0000, Chuck Lever III wrote: >=20 > > On May 24, 2023, at 11:08 AM, Jeff Layton wrote: > >=20 > > On Mon, 2023-05-22 at 16:52 -0700, Dai Ngo wrote: > > > Remove the check for F_WRLCK in generic_add_lease to allow file_lock > > > to be used for write delegation. > > >=20 > > > First consumer is NFSD. > > >=20 > > > Signed-off-by: Dai Ngo > > > --- > > > fs/locks.c | 7 ------- > > > 1 file changed, 7 deletions(-) > > >=20 > > > diff --git a/fs/locks.c b/fs/locks.c > > > index df8b26a42524..08fb0b4fd4f8 100644 > > > --- a/fs/locks.c > > > +++ b/fs/locks.c > > > @@ -1729,13 +1729,6 @@ generic_add_lease(struct file *filp, long arg,= struct file_lock **flp, void **pr > > > if (is_deleg && !inode_trylock(inode)) > > > return -EAGAIN; > > >=20 > > > - if (is_deleg && arg =3D=3D F_WRLCK) { > > > - /* Write delegations are not currently supported: */ > > > - inode_unlock(inode); > > > - WARN_ON_ONCE(1); > > > - return -EINVAL; > > > - } > > > - > > > percpu_down_read(&file_rwsem); > > > spin_lock(&ctx->flc_lock); > > > time_out_leases(inode, &dispose); > >=20 > > I'd probably move this back to the first patch in the series. > >=20 > > Reviewed-by: Jeff Layton >=20 > I asked him to move it to the end. Is it safe to take out this > check before write delegation is actually implemented? >=20 I think so, but it don't think it doesn't make much difference either way. The only real downside of putting it at the end is that you might have to contend with a WARN_ON_ONCE if you're bisecting. --=20 Jeff Layton