From mboxrd@z Thu Jan 1 00:00:00 1970 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 06DEA388865; Thu, 22 Jan 2026 17:04:25 +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=1769101466; cv=none; b=gzMx3E9VlNbklcMA9+TngKjO3iC5a3g8N9NV5cs+c082uujyO6neORQsXZ/M6gwDM6HE3UChe9zrmsndEzMmKhbdimTtj106q1ch51DAsprOq+zEcktiigZeCsIY/DA9ZIdt3FEWnFd9bf1DS3T7qYJqLvcUWowroz3RaTgjAow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769101466; c=relaxed/simple; bh=xwFz5Oidq8APQpCp7THEtDpXn9O+NGssd7GC7NPkIXE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lFd81ztX/t49f9WbggLODfYibK4UuxdagtWRVgepi0CORcdhQyPbxj1wVP597ET6tXVYLH+0Xag7OV8RoYkIhSvlUPus3QKFAmU6/uxFLZ5xeHaLEKZSoAOxYgHLdOy3NWeZ3sQCx32Hirs26iPlO8SAQWagU6jADTn5v6SJrrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ueyMX6oh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ueyMX6oh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 156DAC116C6; Thu, 22 Jan 2026 17:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769101464; bh=xwFz5Oidq8APQpCp7THEtDpXn9O+NGssd7GC7NPkIXE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ueyMX6ohlT+V7E4FTnwyr+bckr2XgM0otlsgh+U8+RB7dufNou2jXtRF8/4HiLX1h aiyHG+xAbRXlOpSKYNl+YW1B6es8lJGWyDpCT3G89X8Bn++QSMPHsovt5BRyWj7Z84 MiFPflUjkr2UeHtVIt004pQ2LHYESJ6jR9ib6bF3tKB5BvchCfBJcHtl2H7eGV6Hj+ XeQh59i2mPbJ0Z07CURTocG8MzgcrhLB0YpqMQ2BX+Q2rUwcSwiRIRCTHIiyBghAen fRki137MnL3p5j+2P7Cc4giyKdLsB0k8xoBASjwbPFk1rE23p0Kg5qRxi8CJQxSLFn VC/vMBqCcUNNQ== Date: Thu, 22 Jan 2026 09:04:23 -0800 From: "Darrick J. Wong" To: Jeff Layton Cc: Christoph Hellwig , NeilBrown , Christian Brauner , Amir Goldstein , Alexander Viro , Chuck Lever , Olga Kornievskaia , Dai Ngo , Tom Talpey , Hugh Dickins , Baolin Wang , Andrew Morton , Theodore Ts'o , 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 , 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, 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: <20260122170423.GU5945@frogsfrogsfrogs> References: <176885553525.16766.291581709413217562@noble.neil.brown.name> <176890126683.16766.5241619788613840985@noble.neil.brown.name> <176899164457.16766.16099772451425825775@noble.neil.brown.name> <364d2fd98af52a2e2c32ca286decbdc1fe1c80d3.camel@kernel.org> <3210d04fa2c0b1f4312d10506cac30586cb49a3c.camel@kernel.org> Precedence: bulk X-Mailing-List: linux-ext4@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: On Thu, Jan 22, 2026 at 07:12:36AM -0500, Jeff Layton wrote: > On Wed, 2026-01-21 at 22:37 -0800, Christoph Hellwig wrote: > > On Wed, Jan 21, 2026 at 10:18:00AM -0500, Jeff Layton wrote: > > > > fat seems to be an exception as far as the 'real' file systems go. > > > > And it did sound to me like some of the synthetic ones had similar > > > > issues. > > > > > > > > > > Not sure what we can do about FAT without changing the filehandle > > > format in some fashion. The export ops just use > > > generic_encode_ino32_fh, and FAT doesn't have stable inode numbers. > > > The "nostale" ops seem sane enough but it looks like they only work > > > with the fs in r/o mode. > > > > Yeah. I guess we need to ignore this because of > > > > Yep. This is a case where the handles are not PERSISTENT but I don't > think we can get away with making FAT unexportable. We're probably > stuck with it. > > > > > I think Amirs patch would take care of that. Although userland nfs > > > > servers or other storage applications using the handle syscalls would > > > > still see them. Then again fixing the problem that some handles > > > > did not fulfill the long standing (but not documented well enough) > > > > semantics probably is a good fix on it's own. > > > > > > Agreed. We should try to ensure uniqueness and persistence in all > > > filehandles both for nfsd and userland applications. > > > > Sounds good to me. > > > Unfortunately, there are already exceptions. Apparently pidfs and > cgroupfs handles (at least) can't be extended because of userspace > expectations: > > https://lore.kernel.org/linux-nfs/20260120-irrelevant-zeilen-b3c40a8e6c30@brauner/ systemd cracking file handles?? Yeesh, I thought userspace was supposed to treat a file handle as an opaque N-byte blob and nothing more, and only certain "special" tools (e.g. xfsprogs on XFS) could do more than that. --D > My personal take is that we should try to make handle uniqueness a goal > for most existing filesystems, but we're going to have some that can't > achieve that. For them we probably want to be able to flag them so they > can be id'ed by userland. > > So, we will need an export_operations flag of some sort > (EXPORT_OP_UNIQUE_HANDLES?). At that point, we'll have to decide > whether to deny nfsd export based on that flag: > > We could deny export of any fs that doesn't set the flag, but NFSv4 > actually allows the server to advertise that it can't guarantee handle > uniqueness. There isn't much guidance for the client on how to handle > that though and the attribute seems to have the scope of the entire NFS > server. > > -- > Jeff Layton >