Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1157679lqp; Fri, 22 Mar 2024 07:14:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqXAFfGc3MzKpA0llvv6kgpvTDXEq/fpjcYOEp/7ab9MvOkMnUqA4Gkym7i+E/YqYltWTMleqxbrxsv73sMnTGAsryiO3pMG+JPJqqUw== X-Google-Smtp-Source: AGHT+IFVc97r5jqkcbUvtX3IZVk0cSsYq0go6W7xjUL32m8PnJ9FCwVXySu5bG/hB75QEv9W8gTE X-Received: by 2002:a17:906:66c9:b0:a46:be37:2685 with SMTP id k9-20020a17090666c900b00a46be372685mr1862416ejp.19.1711116846986; Fri, 22 Mar 2024 07:14:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711116846; cv=pass; d=google.com; s=arc-20160816; b=S3CZwwXMLlHIHqzZq3Me3UO0AueN6uHYBjLWFCQUJpMs9VWF3vq9jwv8h688hGjDup 5YjnZQNaBJ93lVegStPyDpnRue/zsAF8KNaRi9vdYt2iPykO2FLHR8u2+nRKSQpSdQLa TZGtfmx+dOjOtzxSSylaouvbV2HHEgMtwGal9JcqjoP+itcFWHNkFxFnM2F25F9iC1Yh ILj8Fm5K2RsFsGctnAb78toVF53xsrkYrkA296Te+KouMT07MCcMTfnb86ysJJBoMYyi /5GoCOcRMEY9zG2DCr9YXLUdHZnHziALRULLynr8z/I9gdSLgV/5BJLDTKVdypIJhZe+ 9+wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cD+mGxFrFArBjXPa17HKN7UBNL3LUhqwETp40Thuy9A=; fh=scMLWB4D2jbCb3aoVJcHWzL26fVrjozWuZkrYEXvyJM=; b=MrnjqZ0IBTonEWTetlt58ABDdtLRkwv0+HSvemk1+41ZsHVwScRdGTpEPyaKW+R1FH K8UTy0BFTxiMm8AxaquyOmZqGsK9+Gx1EdRu7BmjuiPfu04BWRafQ1oziYRJlF7T0Vcx mqlj2n0Y5gGhuUyY3V5D2wVjOZNGHWtQB4dccXzXGv9ChyaIcBaBYHYdjcD95QagDsnT YXJ56UVIkX8Ms9e3Z7+68W1jXvcxEmTFzoQpPE06a3ZFLetFTbV3OOIHmzlKZXx8rjKL aZ5P5WzVxbulg+FTH0Bktm1BE0LEaWlxVfJNALJJKLT+CbxFowFxNQuQ92r5x3JbOlrg jpKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KeMF9jho; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2445-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b7-20020a170906490700b00a46d5a817bfsi968282ejq.259.2024.03.22.07.14.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 07:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KeMF9jho; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2445-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B4DBF1F23327 for ; Fri, 22 Mar 2024 14:14:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E54346546; Fri, 22 Mar 2024 14:14:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KeMF9jho" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 327E047F41; Fri, 22 Mar 2024 14:14:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711116841; cv=none; b=mkcXTODEShvPT4ClQohkuYPXBpLLXPBDfH2gRJd2j7662xBuXEmxDTvIJ8Tnt/CUlYVDloTVU+tAvpCFDt3EY7HPCUldXCx87xdW5bPaf+FuUZlDZT6rDOlaIvTi+PNSh/7lJPlt0r7jy5o7wICr41ERaE6fqhg3YF+fgtfRHwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711116841; c=relaxed/simple; bh=SUDjNJPFhmAni//UFuk6ejixrIl+KvydT+avjE5yPXk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cmj5QM0oobGNMbW2DzC8hZGIdbAnGJm1Xg5Vbcbw/ONa3f+rKjcjJlWeo4n9PiGNSKBJ1cxtsRWHMk3F6tdEs+yIYVWFBTDXPJmJuzK9svRcc83nCt7APF2SXmJQVmAxkU1fNuumHlRUkilHR3YCss1YH1YxISMiQJeflho1uJI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KeMF9jho; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7E46C433F1; Fri, 22 Mar 2024 14:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711116840; bh=SUDjNJPFhmAni//UFuk6ejixrIl+KvydT+avjE5yPXk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KeMF9jho3Zpr5om0OFiOLl9KpzEzOaTtk4rmviui6eKtaIeHS2GaiAnDBikdvN1dg PuNe6dc6VvndWjiFZvMcdgJWvRG87lKektQkFeKPhqv0nMnD0uxG8mbiPWYKYWjkiK l5M51M81gYo1MmhSljC6G3LoNk6P1qOqIpHWiiiEHzlSGPt2XCfH23vSkf35B5mjiC hmBSi4SDc4noVEbhfSrQd7Jmp3qK5owiZEdDDQq9bECFdLebLhkdDP5XZaGgyjqC7K DpAouu4DyEai6cbIaE/cPVjw2HMGrzV1cXMMCdzPhH5mNsS3jzG1p3YGat+F93bppe u1MPy/83AH2ow== Date: Fri, 22 Mar 2024 15:13:49 +0100 From: Christian Brauner To: Jeff Layton Cc: Alexander Viro , Jan Kara , Chuck Lever , Alexander Aring , Trond Myklebust , Anna Schumaker , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Greg Kroah-Hartman , "Rafael J. Wysocki" , David Howells , Tyler Hicks , Neil Brown , Olga Kornievskaia , Dai Ngo , Miklos Szeredi , Amir Goldstein , Namjae Jeon , Sergey Senozhatsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, netfs@lists.linux.dev, ecryptfs@vger.kernel.org, linux-unionfs@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH RFC 08/24] vfs: make vfs_mknod break delegations on parent directory Message-ID: <20240322-laienhaft-lastwagen-63b3ef508466@brauner> References: <20240315-dir-deleg-v1-0-a1d6209a3654@kernel.org> <20240315-dir-deleg-v1-8-a1d6209a3654@kernel.org> <20240320-jaguar-bildband-699e7ef5dc64@brauner> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Mar 20, 2024 at 04:12:29PM -0400, Jeff Layton wrote: > On Wed, 2024-03-20 at 14:42 +0100, Christian Brauner wrote: > > >  int vfs_mknod(struct mnt_idmap *, struct inode *, struct dentry *, > > > - umode_t, dev_t); > > > + umode_t, dev_t, struct inode **); > > > > So we will have at least the following helpers with an additional > > delegated inode argument. > > > > vfs_unlink() > > vfs_link() > > notify_change() > > vfs_create() > > vfs_mknod() > > vfs_mkdir() > > vfs_rmdir() > > > > From looking at callers all these helpers will be called with non-NULL > > delegated inode argument in vfs only. Unless it is generally conceivable > > that other callers will want to pass a non-NULL inode argument over time > > it might make more sense to add vfs__delegated() or > > __vfs_() and make vfs_mknod() and friends exported wrappers > > around it. > > > > I mean it's a matter of preference ultimately but this seems cleaner to > > me. So at least for the new ones we should consider it. Would also make > > the patch smaller. > > > > Good suggestion. I just respun along those lines and it's a lot cleaner. > I'm still testing it but here is the new diffstat. It's a little larger > actually, but it keeps the changes more confined to namei.c: Sounds good to me!