Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2471186lqb; Tue, 28 May 2024 00:12:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPFxad3yhRVukqFqNR3D6lpMAGHtZYoD74jeVgckTtSj4exSv2pO+Ihya7Pmk2bmglEK82DtyZwhPOLSwvNGlyysGhaJRc2hK7DsEhOA== X-Google-Smtp-Source: AGHT+IE4UKApcFJRy73UdJlIlpXftvrooX8oHNjBaHZPFsyViphS/VGn2a+g6qpQVIRecs9BY8Fe X-Received: by 2002:a05:622a:120e:b0:43d:89f6:910d with SMTP id d75a77b69052e-43fb0ef8307mr156868251cf.54.1716880378366; Tue, 28 May 2024 00:12:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716880378; cv=pass; d=google.com; s=arc-20160816; b=OROX3OJKM4B2OT/Bo2trIKMmKSmTgXv23S7OeYkHXsdqIlquhSD3KduPo1yIRb6Zvq UG1/0CC1rbj7ipVVaKIUfRfxE8jQQnOzfUbvT4FoqHRjnio2ADd2E83W02wDlkRJbsQH 89x1YdjdI9PUGhpeLMXd9P0OOhCmPjwcohDd8jMY0yUpLv8qxDKRAaO9EdS5kfCBQtdP kx+NqGtm89ijzaLTL+XtxIVubIr2nHgUZpKf+sRCAxwtfkd1PsfJK70sVece0WQLZlOO R6DAXFPYYBAQ2UBdddrT6zh527ypHPgeF/XSe9SCoTv1QAPst8132CvIhrgnvtzL2K5C XDCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dG4NhWHvCS+sAwLGKxATX43EhYeIOVZVHG/qWIOlHP0=; fh=iUObQ0KAExOz80QAnguF3c4KuQyf/AgfUmGwzN35Rgc=; b=CXqPThdS75hIxWjVM/CEz5GTQdMPF9nhCsdxplZjy+PlGtwzo/sCIrScfwddddCDcM NndGCVjO4/nN/J80xCSpBhvOjoMJZY6exDT6OxFDUasZMd38zorkNqiZCV6Cnxqw1ZAi 2/860YyHuxrZzpNThaJRtTSwL0P1dkvLORU8PuyZz+1HkvQGACLzB3TmNO4k4b/FwUcy xs46yNhNYUmQ99Le+69KGO3HFJT0LDNl3wg2xxRjA++jVE45DUM85FjC5U8iAo7NMCM3 vWnH9zSdPgtTwQNjv/+vH6oYQGnbdTJjKIhPhueRtdkpA4jPJB1To5DABSFF/WUG8Gps zSPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pRTN5emJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18ed709si111637431cf.804.2024.05.28.00.12.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 00:12:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pRTN5emJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3429-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3429-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7BAA41C21378 for ; Tue, 28 May 2024 07:12:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A182171750; Tue, 28 May 2024 07:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pRTN5emJ" 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 6C09126AE7; Tue, 28 May 2024 07:12:40 +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=1716880360; cv=none; b=p/EtfjFiUJ0gSJVPmeuIC6HU3HLTAaXJhtgyPuEZqVxsi7OMGEYao8Ra4+qVDRoqAWMdVWq5WqXsmGoJzXuwWH6QqOfurFwdLaDnUk872u2h6RJPBV36iCyQtseJ0CzhaZSID/Rlfisvrl2YwZu48Fkl1q2e6iy5tdIvnCZmlJE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716880360; c=relaxed/simple; bh=s5LXjhdG/tOFAjHbokqLAlt1q4Hh3ZREFJN0r4H4gPk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aMkL14nmcAf6b7sqWTsBpIzUjipMyfyX+BYrrtlXXPBiQCXP+TOgvZBp7qKInbnZoE2SdeQMSujMfkfTVn0ZFnLoqZMuJzEBCZsJIFJBhpybLRWnfux5udcCw5+QobiBXcxeTQONHQ+EIs68f3h1zLctmdYNIhwJ9mV2KV+7YA4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pRTN5emJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F62EC3277B; Tue, 28 May 2024 07:12:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716880359; bh=s5LXjhdG/tOFAjHbokqLAlt1q4Hh3ZREFJN0r4H4gPk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pRTN5emJERfn4+pZMe90zu3qCgJMMr7Bq9Vwf43xanoRW3P6Vct1HurpDByatTCO+ wet9rSfBSovb06LdXe69jgHt/ZO6tEVb6HTpQyfFNhqam3hgF3WVambUhGn71rAOI8 D/8UdED/xPZzCnaQ2iQw0LkumuX7AameCfYNXEKsDtvGBpRvTFbm+MIrAtvmr5O67o Oq6/OpMJ4ASMwFv0c6vFpZ9D9xDQ9Ck7Hvqp4hgOn/kupNYuo3lZjfN5D6LQXyx+g3 njm41sUWCxQArqFlq4vp298k/KjfuDgU0qcWcnznDJankQhal3k4+1XcQcTJxkLoyj UPzuYhRFXCBOw== Date: Tue, 28 May 2024 09:12:33 +0200 From: Christian Brauner To: "hch@infradead.org" Cc: Trond Myklebust , "jack@suse.cz" , "chuck.lever@oracle.com" , "linux-api@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "alex.aring@gmail.com" , "cyphar@cyphar.com" , "viro@zeniv.linux.org.uk" , "jlayton@kernel.org" , "amir73il@gmail.com" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH RFC v2] fhandle: expose u64 mount id to name_to_handle_at(2) Message-ID: <20240528-fraglich-abmildern-cca211d1791c@brauner> References: <20240523-exportfs-u64-mount-id-v2-1-f9f959f17eb1@cyphar.com> <30137c868039a3ae17f4ae74d07383099bfa4db8.camel@hammerspace.com> <86065f6a4f3d2f3d78f39e7a276a2d6e25bfbc9d.camel@hammerspace.com> 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 In-Reply-To: On Mon, May 27, 2024 at 09:29:48AM -0700, hch@infradead.org wrote: > On Mon, May 27, 2024 at 03:38:40PM +0000, Trond Myklebust wrote: > > > It > > > does not matter what mount you use to access it. > > > > Sure. However if you are providing a path argument, then presumably you > > need to know which file system (aka super_block) it eventually resolves > > to. > > Except that you can't, at least not without running into potential > races. The only way to fix a race vs unmount/remount is to include > the fsid part in the kernel generated file handle. > > > > > If your use case isn't NFS servers, then what use case are you > > targeting, and how do you expect those applications to use this API? > > The main user of the open by handle syscalls seems to be fanotify > magic. It's also used by userspace for uniquely identifying cgroups via handles as cgroups and - even without open_by_handle_at() - to check whether a file is still valid. And again a 64bit mount is is a simple way to race-free go to whatever superblock uuid you want. They cannot be recycled and are unique for the lifetime of the system.