Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp880689pxj; Tue, 18 May 2021 16:41:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN5xYbfGqP4UOo8VFwdQi0Mpe3VrKZnr0duaSSvaKWNRBkP0rr1rfqxqMn1xXqCiEV0nYQ X-Received: by 2002:a92:1909:: with SMTP id 9mr6918009ilz.229.1621381300093; Tue, 18 May 2021 16:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621381300; cv=none; d=google.com; s=arc-20160816; b=LsDivrbCAIys7S2gz1+bWqxUHZ+aR7c5JX0t+1hqTi2Vb9DZH7qtmH0Am0wNdePgBJ p12Nhdpxgcu01Cj6vLCIMOe1jETfpQkIiz3uhCXe1wTHF5pL+g1KYwhJAUmOlXhe8o4K 4C8L5+VkM6p8rMzzxmqzQKJod+ekDqXrn16dr+5Mx6Txvp1nBWQnFtAiPipABub1pcgH g5NZaZF+xhVOhcPYCbKs4lh++a4EM9Pt/FnMi82eahnVM99/vYwE3VCU3Ff1zocruR5c ZOiC4Lp7gIuJjEJp1fp43/k2rtIiOC3ZxvDbZ0JflcLX7No11zHqPJhtOg00QyH3clLK qU7A== 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=uPegtIapBfiJzsx/1uZbNuaJcpLQ70CzfBaKW7tl9HE=; b=iQTBJKLwtjtG9PdLNrDOF38zGFG5prUqm5c2yCDqjEO5uPFd6t9LYV/Xd+j5TIzq6T 2KTd+2FM5wc8PSGQb6LXxN+j9AvWDwh0eab9yhSgtNVqRfFS9p23og6qquJlsVNsPmHo g4vSZvfQEAZ1r38MAm2Xps/saIbNHq1Iui50B0DsvvdKcQlZoKqjW5rFviG87oRYD7v8 B312vE8yQ+iWHVLNWvIiXlwD4PyDbXis8mWiKTJFAAbvGsJWuVODsjwgX76CysR0ijLt YwCCKvTmEtsy/d+LGAN+STTj8Lg7JrpekU5qFwgOHvkT1zCRNF/ROP6S2gF38ZOTVwP1 6ZaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=lJYQKI6u; 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 x99si4345561jah.122.2021.05.18.16.41.17; Tue, 18 May 2021 16:41:39 -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=lJYQKI6u; 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 S237349AbhEQS6S (ORCPT + 99 others); Mon, 17 May 2021 14:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237347AbhEQS6R (ORCPT ); Mon, 17 May 2021 14:58:17 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C4BCC061573 for ; Mon, 17 May 2021 11:57:01 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id D118364E8; Mon, 17 May 2021 14:56:59 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org D118364E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1621277819; bh=uPegtIapBfiJzsx/1uZbNuaJcpLQ70CzfBaKW7tl9HE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lJYQKI6uF0vuhesXHhofsnGAI5guKdmfTxIf9rlEk3Qj46e5ojCFCXsSnx77PAP3r G6xdCgr+z/fzlxB8px71U/9bVLdyFu8PKRjPXmiYCNpkwtYBO9ixiDmbfyxViVoPpm 65mqBYyNLDRYM5bVj2eAV13knPckOK3rm9RAZmwY= Date: Mon, 17 May 2021 14:56:59 -0400 From: "bfields@fieldses.org" To: Christoph Hellwig Cc: Trond Myklebust , "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: <20210517185659.GA4216@fieldses.org> 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: User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, May 15, 2021 at 08:02:39AM +0100, Christoph Hellwig wrote: > 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? I don't know. Do you know why do_unlinkat() is doing the same thing? --b.