Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3764294imm; Mon, 4 Jun 2018 08:53:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKBgK/gjNkafsvkezNdygYwf4gpB7pE85SS6fvXmYGJnbmV0K3XKgJ2dGCQ8AWbM9TyRJMl X-Received: by 2002:a65:6517:: with SMTP id x23-v6mr17756496pgv.268.1528127633619; Mon, 04 Jun 2018 08:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528127633; cv=none; d=google.com; s=arc-20160816; b=JJmxfHRjvemglZv5Vxnjg+X0ie6lTs9bWYjGeUZK53xWce0KgjKP5Mlwp3Vr0oJxcu TDzNbHZvmCoNJHmJCZw+47EOF8WaSOMe+ktbksNbgWeT33HeIX3G3ZPwREMs5DrA/af+ GOF2M3/FMXPCrXyO1EeeDaKcCzp4o7rwXTTlZCZX7ntCNbh5dL8K0SlHFLHVFP1/23cB k0UESyp/fRrw16rU9VvVMOctbQkMszLrB35KahkCO/1c6yvipdV2IjQGkq2b36REW/cN xykepj8S0Vs/ywCoXWlSkIioiyNYOlV/2jZV/mSQKFjltSpJksV+XS+ivdvi6wQlENwO bJ1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=2wveOpAwlEbnc6WyOEvm5UrYfXOQrVaKMjEmkg8cQkc=; b=betGuNZEsa5uj1yzJLKjXraPphcDBN0ZfIFWiFvb6jHKuh8OI24kydp051+iQvYf7g zJzDmepdipHJYSPClx6zqvUb2sdvXZAFxTsFw8tHqOtmKcZSevm8FwvvuMc+3CTr4HUE /HAJD9JrARxfry/EYStnla1WGhcwzUGmLhKqBTVba2qOLW1P2cdUiRjdHvk/3Gi7JAEy beTKKu+FjfT5bhSPU34O6ITazbOwPf6U8KSKYbySyccwTg1FZDgz5HbqP1I/ta9+AsmL ZJxG2PX1lj8yLLahGF7TF6RXSk+4AbTVvusij9DjcszxIsq3LBMjtQzvRuATpZ1kExjv zp+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y187-v6si19913961pgb.120.2018.06.04.08.53.38; Mon, 04 Jun 2018 08:53:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751228AbeFDPwM (ORCPT + 99 others); Mon, 4 Jun 2018 11:52:12 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:35772 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750723AbeFDPwL (ORCPT ); Mon, 4 Jun 2018 11:52:11 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fPrm9-0002at-Sd; Mon, 04 Jun 2018 15:52:05 +0000 Date: Mon, 4 Jun 2018 16:52:05 +0100 From: Al Viro To: Miklos Szeredi Cc: David Howells , Christoph Hellwig , linux-fsdevel , linux-afs@lists.infradead.org, LKML , Linux API Subject: Re: [PATCH][RFC] open_tree(2) (was Re: [PATCH 30/32] vfs: Allow cloning of a mount tree with open(O_PATH|O_CLONE_MOUNT) [ver #8]) Message-ID: <20180604155205.GH30522@ZenIV.linux.org.uk> References: <152720672288.9073.9868393448836301272.stgit@warthog.procyon.org.uk> <152720691829.9073.10564431140980997005.stgit@warthog.procyon.org.uk> <20180601062654.GA32397@infradead.org> <7067.1527841663@warthog.procyon.org.uk> <20180602030913.GU30522@ZenIV.linux.org.uk> <20180602034255.GV30522@ZenIV.linux.org.uk> <21804.1527954321@warthog.procyon.org.uk> <20180602174957.GX30522@ZenIV.linux.org.uk> <20180603005532.GZ30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 04, 2018 at 12:34:44PM +0200, Miklos Szeredi wrote: > fsopen = create fsfd > fsmount = fsfd -> mountfd & set attr on mountfd & attach mountfd > fspick = path -> fsfd > move_mount = attach mountfd or move existing > fsinfo = info from path > open_tree = new mountfd from path or clone > mount_setattr = set attr on mountfd > > Notice that fsmount() encompasses mount_setattr() + move_mount() > functionality. Split those out and leave fsmount() to actually do > the "fsfd ->mountfd" translation? Might make sense. > fsinfo() name suggests it's in the same class as > fsopen/fsmount/fspick, operating on fsfd object, but's it's not and I > think that's slightly confusing. > > Rename move_mount() -> mount_move()? mount_move_bikeshed_bikeshed_bikeshed(), surely? > Also does it make sense to make the cloning behavior of open_tree() > optional? Without cloning it's just a plain open(O_PATH). That way > it could be renamed mount_clone(). Umm... I'm not sure about that one. If nothing else, OPEN_TREE_DETACH might be a good idea, in which case cloning is not the primary effect; hell knows.