From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74BF19460 for ; Fri, 16 Jan 2026 00:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768523273; cv=none; b=ayqSauigsMtGZzy/RImas6zQsRim/R7Evj4S39EU5LlwCaQ8hDWmkoQg6VWYom3KOkuzxJpNK9I6C1D6jlHf2RV9MJZA3D9Y8JheItXzIbOYnhjq/smG+rDVY5TG8r8oTk4eRg116vn6nQWqjcAIgmd4nlvqmdOsPi9bbLdkow4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768523273; c=relaxed/simple; bh=wyZTSNaahlwJAh0cMf67fv0LFlau0J3pldiB0gJ7Ut0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QH8zIyRQDA4/X2n9vq1QIRhP/FVMBZBrMY9PmFaEUglgyX6mMTnDrhgICQ1QuPRsviUzCZAqoJkGjZVDPE0kH0mplKZY8ofxzXnUxOBewOVKd6ezO1NHAT7jEVvz9CaVQ4btYDQlZ85H52wvLyp1L5wfbWVyqQcTXoTzKtXmJUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZPF66rU7; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZPF66rU7" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-b8765b7f4c0so250037366b.0 for ; Thu, 15 Jan 2026 16:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768523270; x=1769128070; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=LuYXJTx9p8g5I9PbL+x4hBzLoIE63ueUkinqkyb6yNs=; b=ZPF66rU7KvrjB2YCW2KdWZUtrBTgTmZ8WI2iPfTktgScWuCl2W6Td5NSSWvSaJYYMs NGHg5uclt6hWkZvJfjwkdP2+0gEhSryFxPj8aS22XiY+0qSTBLjG6KXD7f8gPrPFWJC6 oo8TwE4c/6l7xx1FYwNLDPAjKI+IG7BBZ9xUT39FDGdX7FMIXKfs/PM8AXsnnxDZeYKh F3HGybqku0r4317frl0svmkwavEul9QEO+ZSD2aqxrXEJUOZ+1sMAVrkHt3+r2XNn+ZJ JdWzgDS9tcARZ4OdcK1xgQ5ys6P857CMsjlMb9/DDK4wE1lzL7SQXtUth+0/8Wy2+o6z zTow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768523270; x=1769128070; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LuYXJTx9p8g5I9PbL+x4hBzLoIE63ueUkinqkyb6yNs=; b=qSDFtDv2qgBUxgFeYg5OyjSlnEOxANISr4+sHsFEubm+txHgqoNqYyO3NwpeXFqhkS k3W0VqI4xLpR6DaQvzYv56n/kIoSTL2zrK+nI2cEtNfmRPHZsaXjDeNeQDCm0lDfc1RX 9syWEUmTWb0yUuLPWgQUYOkVPTK/alsL709yj9blZuRaTOagRqVQ4Lg0meAWvQitwMjn DfZF9yPTo65DmgFQoj0gvTgOpyqIKbaAvpS4jbV3jJGJ8TqKwRDn3MBFByL/GRJscS7b QkLcTeykZs349oUae0aSt3DRrTrL1xgGrz6WboP3Pr4sBlObBki2y0aiWZ9SqGqazHuM hqOw== X-Forwarded-Encrypted: i=1; AJvYcCUVqvnFpcs6H6STBhYC+j202/zlNsrZBFZ5gGYntzhvTH83W2SxFlnvDVgL4aelzvbCE2IjsfS8vEIY5w==@vger.kernel.org X-Gm-Message-State: AOJu0Yz7rFJ6jlhFb8cb5ixtWrzZYGNGsWcJXsLMuK7vWawR1UMha6KL GfdxiVS66SuotKKJpsxKwQqH8+kfjMqJ7wgp54j5QLVKZ0JTZuI+cj431oRqeg== X-Gm-Gg: AY/fxX5J142FiXgjQXnOQRTK+DoIKeHENkEt24Z18+p7fUhbS7hclx9YjVJ676zX30W 3GtG0sh4Gakt58frOGZ0LjaZF9xI+bZbbp+7oi9iG8FIwkweU/jE1/1mlxYGSoO8V9Sc3Ic/2I4 Vc3/97/12GTmArMF8ojQKCGpoYZN7/Jpf8L1Coid0k1dOk6c0FY+SKGbZdbt2XzTvSNcsBeVePD kn1uNTk+AyoeUYOmKlmSMFVTCnAoL7gNOdvhBvieU1024C3wlZPLbb4rKNaz2ksLldsy0ibYuPs QD9dGJ1r7j/BCZPc5eRaC7h6drCdmNfgPl5QfIDJp2u6dRhDCPE7LLSGq1z18SyviIe/jP0twnZ 0oUuXZMb+7wbJdD1zGyTT/id+OpNsBcziGotqTxlDS1+FQQPVF63q1teLvWTB75cu40ovRRp0f9 IbEs7fykB40K1QWAwB5UkGQT+PxwoWy3x09Zxn8UJeVhE7tVpbzIwI X-Received: by 2002:a05:600d:8445:10b0:480:1a22:fce8 with SMTP id 5b1f17b1804b1-4801e3494acmr11682565e9.26.1768516821247; Thu, 15 Jan 2026 14:40:21 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356996dad0sm1443737f8f.27.2026.01.15.14.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 14:40:20 -0800 (PST) Date: Thu, 15 Jan 2026 22:40:18 +0000 From: David Laight To: "Chuck Lever" Cc: "Dave Chinner" , "Amir Goldstein" , "Jeff Layton" , "Christian Brauner" , "Alexander Viro" , "Chuck Lever" , NeilBrown , "Olga Kornievskaia" , "Dai Ngo" , "Tom Talpey" , "Hugh Dickins" , "Baolin Wang" , "Andrew Morton" , "Theodore Tso" , "Andreas Dilger" , "Jan Kara" , "Gao Xiang" , "Chao Yu" , "Yue Hu" , "Jeffle Xu" , "Sandeep Dhavale" , "Hongbo Li" , "Chunhai Guo" , "Carlos Maiolino" , "Ilya Dryomov" , "Alex Markuze" , "Viacheslav Dubeyko" , "Chris Mason" , "David Sterba" , "Luis de Bethencourt" , "Salah Triki" , "Phillip Lougher" , "Steve French" , "Paulo Alcantara" , "Ronnie Sahlberg" , "Shyam Prasad N" , "Bharath SM" , "Miklos Szeredi" , "Mike Marshall" , "Martin Brandenburg" , "Mark Fasheh" , "Joel Becker" , "Joseph Qi" , "Konstantin Komarov" , "Ryusuke Konishi" , "Trond Myklebust" , "Anna Schumaker" , "Dave Kleikamp" , "David Woodhouse" , "Richard Weinberger" , "Jan Kara" , "Andreas Gruenbacher" , "OGAWA Hirofumi" , "Jaegeuk Kim" , "Christoph Hellwig" , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-xfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-unionfs@vger.kernel.org, devel@lists.orangefs.org, ocfs2-devel@lists.linux.dev, ntfs3@lists.linux.dev, linux-nilfs@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-mtd@lists.infradead.org, gfs2@lists.linux.dev, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH 00/29] fs: require filesystems to explicitly opt-in to nfsd export support Message-ID: <20260115224018.2988ca25@pumpkin> In-Reply-To: <06dcc4b6-7457-4094-a1c6-586ce518020f@app.fastmail.com> References: <20260115-exportfs-nfsd-v1-0-8e80160e3c0c@kernel.org> <4d9967cc-a454-46cf-909b-b8ab2d18358d@kernel.org> <06dcc4b6-7457-4094-a1c6-586ce518020f@app.fastmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 15 Jan 2026 16:37:27 -0500 "Chuck Lever" wrote: > On Thu, Jan 15, 2026, at 4:09 PM, Dave Chinner wrote: > > On Thu, Jan 15, 2026 at 02:37:09PM -0500, Chuck Lever wrote: =20 > >> On 1/15/26 2:14 PM, Amir Goldstein wrote: =20 > >> > On Thu, Jan 15, 2026 at 7:32=E2=80=AFPM Chuck Lever = wrote: =20 > >> >> > >> >> > >> >> > >> >> On Thu, Jan 15, 2026, at 1:17 PM, Amir Goldstein wrote: =20 > >> >>> On Thu, Jan 15, 2026 at 6:48=E2=80=AFPM Jeff Layton wrote: =20 > >> >>>> > >> >>>> In recent years, a number of filesystems that can't present stable > >> >>>> filehandles have grown struct export_operations. They've mostly d= one > >> >>>> this for local use-cases (enabling open_by_handle_at() and the li= ke). > >> >>>> Unfortunately, having export_operations is generally sufficient t= o make > >> >>>> a filesystem be considered exportable via nfsd, but that requires= that > >> >>>> the server present stable filehandles. =20 > >> >>> > >> >>> Where does the term "stable file handles" come from? and what does= it mean? > >> >>> Why not "persistent handles", which is described in NFS and SMB sp= ecs? > >> >>> > >> >>> Not to mention that EXPORT_OP_PERSISTENT_HANDLES was Acked > >> >>> by both Christoph and Christian: > >> >>> > >> >>> https://lore.kernel.org/linux-fsdevel/20260115-rundgang-leihgabe-1= 2018e93c00c@brauner/ > >> >>> > >> >>> Am I missing anything? =20 > >> >> > >> >> PERSISTENT generally implies that the file handle is saved on > >> >> persistent storage. This is not true of tmpfs. =20 > >> >=20 > >> > That's one way of interpreting "persistent". > >> > Another way is "continuing to exist or occur over a prolonged period= ." > >> > which works well for tmpfs that is mounted for a long time. =20 > >>=20 > >> I think we can be a lot more precise about the guarantee: The file > >> handle does not change for the life of the inode it represents. It =20 > > > > > > > > File handles most definitely change over the life of a /physical/ > > inode. Unlinking a file does not require ending the life of the > > physical object that provides the persistent data store for the > > file. > > > > e.g. XFS dynamically allocates physical inodes might in a life cycle > > that looks somewhat life this: > > > > allocate physical inode > > insert record into allocated inode index > > mark inode as free > > > > while (don't need to free physical inode) { > > ... > > allocate inode for a new file > > update persistent inode metadata to generate new filehandle > > mark inode in use > > ... > > unlink file > > mark inode free > > } > > > > remove inode from allocated inode index > > free physical inode > > > > i.e. a free inode is still an -allocated, indexed inode- in the > > filesystem, and until we physically remove it from the filesystem > > the inode life cycle has not ended. > > > > IOWs, the physical (persistent) inode lifetime can span the lifetime > > of -many- files. However, the filesystem guarantees that the handle > > generated for that inode is different for each file it represents > > over the whole inode life time. > > > > Hence I think that file handle stability/persistence needs to be > > defined in terms of -file lifetimes-, not the lifetimes of the > > filesystem objects implement the file's persistent data store. =20 >=20 > Fair enough, "inode" is the wrong term to use here. Usually there is 'generation number' changes when the inode is used for a new file. IIRC the original nfs file handle was the major/minor for the disk partitio= n, the index into the 'on-disk inode table' (the inode number) and the 'generation number' (but I'm sure the length was a power of 2...). It's not surprising Unix uses inode number and file handles. K&R would have used RSM-11/M where 'file directory lookup' was a userspace operation and the kernel only supported 'open by file handle'. Although that got lost between there and ntfs. (Windows IO is definitely based on RSM-11/M though.) David