Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp878627pxb; Thu, 23 Sep 2021 12:33:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyN8FckKjIGAb2bpulyoM3lxBVKb3W+00Pa+kUQLHMja56Y9zFajITQOWLUnqYSN+OJ9xk5 X-Received: by 2002:a50:e142:: with SMTP id i2mr543800edl.107.1632425599751; Thu, 23 Sep 2021 12:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632425599; cv=none; d=google.com; s=arc-20160816; b=t/JswIB/RuOBRILP8Ezdjx+ua7zw1QfbtmjgjxN3rzBybqKy1LA8MwNIPA+GEPUVSX K6FVnUdA97LFJe+3+swLK/Dk4votiqrm3AA/vJSDo51wcHbbAfJK5InDsV9lrKUL1rX+ GGG0uvPg8PFTFTN6cRgNhKMb7axFpl6wboV+V0KcaR3ptsnxDPGEj6Bw/1Jr5a/im66m zxUcBYLyk/ksB3XMR23LBanzIRfaG1ndF0y4cdZir97lwxhM+hCJrI8OFzaVZ0v6MW3W 9rCAXF8bKNAB+pjxTt6JH7eo4qDNMwHJGfcUFXhLkKeR5bVAhnWwpdFtvwvLpQyW2xpc LM0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=xkjN57pNriAf/4GA6VhqgIP0rfzKAEP9yyQo51zE1es=; b=BeKXRwWettcNbd1ev55+gZQjDABNPoGlXNlw3ROpaj4KdYiExymF5WI2IEr1ojkFbr 7ThWDJEM+aE48k46BbFWreg8jvz7Uxad8lmHam6jjikHQY86MH9oTOojMxW34m+UpB4T FTTyjMNu4vJFBoe0V2MmutPpRjfbg9AgYbW+ATZ51E1Qp0hk19DCaa7Hf1ymilQGSYuG 9nT99K6ebfx2IxJXTB1+LfJ+ZK1pA1uGsXwp8aZmqQ3bpLjNmfrB9rtbalvcAUCf6iKy 2lWdFEZyHOza6Rm1Y7XIbTI+Z851rITnc4HgQ7/B+iWrrC/03mTDLWR5WNwsWLt1qp7f f69A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=fz9S1xV9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si6942757edw.179.2021.09.23.12.32.43; Thu, 23 Sep 2021 12:33:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=fz9S1xV9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242845AbhIWTeN (ORCPT + 99 others); Thu, 23 Sep 2021 15:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242796AbhIWTeM (ORCPT ); Thu, 23 Sep 2021 15:34:12 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 356E8C061574; Thu, 23 Sep 2021 12:32:41 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 963DC1512; Thu, 23 Sep 2021 15:32:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 963DC1512 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1632425559; bh=xkjN57pNriAf/4GA6VhqgIP0rfzKAEP9yyQo51zE1es=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fz9S1xV9jwRb3mBJdTbpmQy8Z9xqRNf9QwN2M/g9W/jUNKDmQjg9rksuEXyJ/oVWn 8lwFv0AbqPLZUPOJdLW+5LIOhZtXc5BylvZPZLe+lAA4pozq0T7hLGzTt7+/ro8MKb gdzlcEEcOoOaL1mjBrc9V3TRexYIi1nkiQw1mexg= Date: Thu, 23 Sep 2021 15:32:39 -0400 From: "J. Bruce Fields" To: dai.ngo@oracle.com Cc: chuck.lever@oracle.com, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 2/3] nfsd: Initial implementation of NFSv4 Courteous Server Message-ID: <20210923193239.GD18334@fieldses.org> References: <20210916182212.81608-1-dai.ngo@oracle.com> <20210916182212.81608-3-dai.ngo@oracle.com> <20210923013458.GE22937@fieldses.org> <9e33d9b7-5947-488d-343f-80c86a27fd84@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9e33d9b7-5947-488d-343f-80c86a27fd84@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Sep 23, 2021 at 10:09:35AM -0700, dai.ngo@oracle.com wrote: > On 9/22/21 6:34 PM, J. Bruce Fields wrote: > >On Thu, Sep 16, 2021 at 02:22:11PM -0400, Dai Ngo wrote: > >>+/* > >>+ * If the conflict happens due to a NFSv4 request then check for > >>+ * courtesy client and set rq_conflict_client so that upper layer > >>+ * can destroy the conflict client and retry the call. > >>+ */ > >I think we need a different approach. > > I think nfsd_check_courtesy_client is used to handle conflict with > delegation. So instead of using rq_conflict_client to let the caller > knows and destroy the courtesy client as the current patch does, we > can ask the laundromat thread to do the destroy. I can't see right now why that wouldn't work. > In that case, > nfs4_get_vfs_file in nfsd4_process_open2 will either return no error > since the the laufromat destroyed the courtesy client or it gets > get nfserr_jukebox which causes the NFS client to retry. By the time > the retry comes the courtesy client should already be destroyed. Make sure this works for local (non-NFS) lease breakers as well. I think that mainly means making sure the !O_NONBLOCK case of __break_lease works. --b.