Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1996465lqb; Mon, 27 May 2024 04:48:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlLr7TYFf2tmBu+TlGuGekzwg/1LSw9Wm3vLjM2SYFCIJVhZjqY7JAw69DYOuDffWfJK9TK/8s/Y0hwY8sWC6o6knt+3kWWV2mR/ZsaQ== X-Google-Smtp-Source: AGHT+IFlh57T/Hkuu/EYFokZvZR64RiyeD5+0tdnRL26QxpPF/eRUftDcISpmjjp0vX9e2xlXIbn X-Received: by 2002:a81:a052:0:b0:615:3262:ffb1 with SMTP id 00721157ae682-62a08d89fa5mr84790047b3.12.1716810517615; Mon, 27 May 2024 04:48:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716810517; cv=pass; d=google.com; s=arc-20160816; b=NXti4+awb+KgbNz/uUaN1ek65TEqN5LS3NiY4QVPxir6NpLDUZTXRXEQZMyAqUB8UU ar94lndJejyNTS6NuytFnb6Ab/99QKJ6wrmgES1hXLmrfahrZ4SmoIZKvXwsq6EaTQlX a6q6+88Qq1toU9sovtf2bmsuCdv8n/oesY/06R41nybtDH/VN7J4FWNTVaUHmQl9qEvs rZ4MzZy3Dv/Dq8AnJ6tjmH96TjYTU9izPMVH+fmZiEEfp8cbEMsBn2x6fF/7P/VUo3MB /1gDMx++Dx3XZoWDGL06ZGHiIA+aIcpGv86OhcXqEnVSs3JdgEJYyM6LIMMgJ0lyDe9e N0vg== 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=2iRQNARYz6TUh7I9OHQgqaA8lNEZzq7pUVB+8f4qGN4=; fh=Em9DUQJ1127cVab9asnkE3m0/bMxVExW/tPvR1jZ8Ds=; b=o6+f5zOBq5v1YLCeVp9cQHwHjaHeCuMetl6+fO2xEgAb9SSLNyV8s7/quADDpL68ey UQHZVL1UKFyI02PoRJyOY3R/wRNIGyECz5byo5ZWrrJKebHltrpJvRVVrXs9qOYnsqWK j3aaFWvrF/9/jUBUny8XBjv7XcpTwZia3CdimqyR96S3XJhQklV4j1gEQ+LK+xlrbzkR dgEk/Rd/leYksN1H+yzl2GnAww0oTSJF8oH1muJm9Cl2tlYv7NyGh3BzdHSWlBFONGfs Lf8RoG0iyKB6pGkbkuckB88bXjAmFRi8semckqw90nhMnj/E1aU7FJmZJruBUiBVUm85 eMrw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="DqGCY/hL"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-nfs+bounces-3402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3402-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac070f1006si77605236d6.270.2024.05.27.04.48.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 04:48:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="DqGCY/hL"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-nfs+bounces-3402-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3402-linux.lists.archive=gmail.com@vger.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 5BF0F1C2112C for ; Mon, 27 May 2024 11:48:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5249B15DBCE; Mon, 27 May 2024 11:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="DqGCY/hL" X-Original-To: linux-nfs@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EB0EE1581E2; Mon, 27 May 2024 11:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716810483; cv=none; b=bJtW+JE5UDUBE8Dv04mE6FjZ2Z61GY4RiVu0SCqzhZ5nv/Aa82yFzrQljGFUCJAiDlSaQoaH8GJxzs03VPejEXwVFxNxn+nwcMima5sUqtTD/E+WOCvyeEB5jKIl2pB8pNbGbk8dC7Wh26JMwGEEdrqRe2/2s7uJEC57+AdsrNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716810483; c=relaxed/simple; bh=Xi54afU0dRqoCutzzQ1x9zNEqkgWSsCL5ib1ypoy3ho=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sxB1s7QzdPQaMiHo5ifTgC3kITZG1Vt5JQCjPlyLbnmk+4V1z9pkQZQmCYQzVEy9NLsS67W21ga2fYXaZCKpgW71dgnvjrp/LZIMFAhaZoj8G9sll1lSzscLzlLZv0cTN4THAWqwIjr5QQaXfvQv657OwvNAZnIBSGxFvddQDtk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=DqGCY/hL; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=2iRQNARYz6TUh7I9OHQgqaA8lNEZzq7pUVB+8f4qGN4=; b=DqGCY/hL/0v4+ZNJS7sSHJagi8 oZVPqgNF/00HXA745NxhP4BaRThnL5JZpYyz5qG3Dfgag4MWoutaQBQv+9ZH7FzRYe6lMguZCdxE4 fs/abRl28V5+/10XFpBn8pLZH6w464YsE4cIRiurnyZJ78wezBYtzgh3zDgN1+wHKo9lZVA9YCicg 38tSg4lFKZly7B3RPJwAOTjWqkKBV2l64rOpBvPFBLQ1Nx4lPke/2zxidK6ARkANVo127qwbbXthp lPsQfeN3tZiUujm2xVdSG8Mcx2JGGivYojdgjv6GZfruQWwudJQ/Y9dX/rsvKXk6gzI2geUnFXlpQ BkNDiedg==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBYpY-0000000Ejny-3eAr; Mon, 27 May 2024 11:47:56 +0000 Date: Mon, 27 May 2024 04:47:56 -0700 From: Christoph Hellwig To: Aleksa Sarai Cc: Christoph Hellwig , Alexander Viro , Christian Brauner , Jan Kara , Chuck Lever , Jeff Layton , Amir Goldstein , Alexander Aring , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH RFC v2] fhandle: expose u64 mount id to name_to_handle_at(2) Message-ID: References: <20240523-exportfs-u64-mount-id-v2-1-f9f959f17eb1@cyphar.com> <20240526.184753-detached.length.shallow.contents-jWkMukeD7VAC@cyphar.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=us-ascii Content-Disposition: inline In-Reply-To: <20240526.184753-detached.length.shallow.contents-jWkMukeD7VAC@cyphar.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Sun, May 26, 2024 at 12:01:08PM -0700, Aleksa Sarai wrote: > The existing interface already provides a mount ID which is not even > safe without rebooting. And that seems to be a big part of the problem where the Linux by handle syscall API deviated from all know precedence for no good reason. NFS file handles which were the start of this do (and have to) encode a persistent file system identifier. As do the xfs handles (although they do the decoding in the userspace library on Linux for historic reasons), as do the FreeBSD equivalents to these syscalls. > An alternative would be to return something unique to the filesystem > superblock, but as far as I can tell there is no guarantee that every > Linux filesystem's fsid is sufficiently unique to act as a globally > unique identifier. At least with a 64-bit mount ID and statmount(2), > userspace can decide what information is needed to get sufficiently > unique information about the source filesystem. Well, every file system that supports export ops already needs a globally unique ID for NFS to work properly. We might not have good enough interfaces for that, but that shouldn't be too hard.