Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1104742pxj; Sat, 15 May 2021 04:07:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVVPhiRViXLNf6AyjbIoD3Kt075mE+lfU1lJWc5dxxUCmL4CXNbMrhDlb65YVXAXIqemq+ X-Received: by 2002:a92:c5aa:: with SMTP id r10mr8083387ilt.89.1621076821880; Sat, 15 May 2021 04:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621076821; cv=none; d=google.com; s=arc-20160816; b=vOJe+RU+7fiOVE6JkxSIf5FLDfSADLIdkSIl7a/Aeo8F/VCVKfoB/ubl9KpPsx6vT0 qHhvatwmPvauI2dSf8rqDiwZ9sKfNw4aHx4lrKLJZ99jlP/RoP7AZvgEK50/5QcEQmx/ bCiFHbiKCbYeqxtlZEE4iRqMc9IIAxCvyB4se+pyGT7FexceGbnP5NGKbEpTWglqgTs5 hcyrwemiUoBENOKMAYZvzD3QwzcQzDHbu8rCH0mqQU4clDulebHcBb8OKFbvadyzVJaf LC/i6Yy1uKrHjuLfvsII4y7L3qtcltH7A5t38r98P6Aa3zVhsvdtyU8jSSFcq2lhznZA /clA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kT2mULHmwwRIPQ7oDESt9uU8rPoqxHm+nEUtlwqVQwo=; b=dtBX7GxmS5G2wedmshuDVRfXH+Jbij7fR1+BvsqJ3Eq9JmMaHu5uAJOZu2tPB6STGA 4W4Whq+l6cofuLe5ETN/LHesH86hOZpRETcj5i4BrBfW26nC9qply4lKlvaHg7gtkOtY XzbbPbtW+5dUYVDdTaHWf3VloWYnuaqgF9vO3VaiTgmxCKfioXEIgOtr5Mb9/1pozXk7 XGX+DFqHdq7a8FeP7WuYZeJmsv1lCGcOAw7HlppKwZbQetEwOJuolYF/S5l5SiLvkV3N 55vVChvPX+BPfV5VgcYqiNEOpSUsM3fppwz0ilZNtIZFgZeIvxVDhrtFITELWvbu4fO5 eyoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nkPUlEKu; 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 x19si11063621jat.51.2021.05.15.04.06.40; Sat, 15 May 2021 04:07:01 -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=@infradead.org header.s=casper.20170209 header.b=nkPUlEKu; 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 S232440AbhEOHES (ORCPT + 99 others); Sat, 15 May 2021 03:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232435AbhEOHER (ORCPT ); Sat, 15 May 2021 03:04:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AF7BC06174A for ; Sat, 15 May 2021 00:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=kT2mULHmwwRIPQ7oDESt9uU8rPoqxHm+nEUtlwqVQwo=; b=nkPUlEKuH4v+6IElgFcFVwqWXg RXywjjp2ASBoTODKJOxpL94Zdpn2Q8GqUpcXuUp1o83l+XM7VJWxQ+FtG6w7Qy0htDET7sLDKXnnC ts4nWrp8ysrQoln2G5lGc6mZBnNvGOrHezbPiGuwvMwnzKvseHAPl/Dr2sDnZXiOrjOOzBE6w0O0o gO1F2GT7vKF8ktpUoP/e9HN0JK/lZHQHhCLbqNYSRo5hynzJX1uZA1RABHLPVoLYrRBgCOAqtAzkD U3u6cYGzf0UqaBOi1WeJhyzyYOS68v7PQYoaI2IXjsPqazUevJ1vzenWDNzuMMIRDQHcMQtmW4Gme 6HWbQp8w==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lhoJr-00B2VI-EU; Sat, 15 May 2021 07:02:39 +0000 Date: Sat, 15 May 2021 08:02:39 +0100 From: Christoph Hellwig To: Trond Myklebust Cc: "bfields@fieldses.org" , "nickhuang@synology.com" , "chuck.lever@oracle.com" , "robbieko@synology.com" , "bingjingc@synology.com" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH] nfsd: Prevent truncation of an unlinked inode from blocking access to its directory Message-ID: References: <20210514035829.5230-1-nickhuang@synology.com> <00195ec8bf1752306f549540eed74c3938c5e312.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00195ec8bf1752306f549540eed74c3938c5e312.camel@hammerspace.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, May 14, 2021 at 03:46:57PM +0000, Trond Myklebust wrote: > Why leave the commit_metadata() call under the lock? If you're > concerned about latency, then it makes more sense to call fh_unlock() > before flushing those metadata updates to disk. Also I'm not sure why the extra inode reference is needed. What speaks against just moving the dput out of the locked section?