From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796316181; b=RQX36Sj4PJcXbzSR435YBDXp04CzOcfVpObQ05v1PadgGd5u0/CGKLxouQJEdxST2+Ah VHMlsA2Ed0GRAbN9NTH7F3rZ9ObQQ/AV60A2OOfVeoajvjWLwTVQl1bpRv0GOaCd/TXVa MqN0Ud8pmnW2cSK1eLaqV+FFv3Bxp500dg0aoishKWGcYFNJ32mUhyHHVlU5IZxp1p3rI qhEbYP4+bx4AfkFpEKtx31qf6zJU7+Licq43LHwepg0jOKRjvFogkCyMVggvsUA8GXmUa kCArM2nfAhXsDBqmIxpkKNKwShheH7xccm0y3kbPCd859emwxxAkBNcEsIJ0cxE3VJA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796316181; h=Received:DKIM-Signature:Received:From:Date:MIME-Version:Content-Type: Content-Transfer-Encoding:To:Message-ID:Subject:X-Bugzilla-Product: X-Bugzilla-Component:X-Mailer; bh=J/XQcK80eO2w13ckfuQ9k6LIMp76ipFLj++GaQFTyC8=; b=lY4gVdahWuB+yRI5QN+b2iz7czzKTWNX79IvDm+Nf+xah8hdgVrpeKQgxtsHsB70xW81 hk/m3ElgN7VolXpF0VtD6sZUgIYPYqIGZRfJnbVVbB53jGj8t6mhaRfjmDFZHfHRnodoi bCiCJ4QS1vpLTiIj4NHuxP57PaUfthCu9n/vgpfkBIP3T3+2RzfyHCLy92MgQ9eW836QE FgD2S7OpVRe9+/axsAFWlMdQP2uKOG0StN7wjeq42gi2ke++vL3qSZZdQvf5rDIJ4GJQD DsyBGtCE26zmXV27D6/6isccnLvXoxmW2M5xuDWWab+MZjD7qXNZBO967X6JzaHeWNA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=K1Pog5SL; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 170A2606A322 for ; Thu, 3 Dec 2026 16:43:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=K1Pog5SL Received: by smtp.kernel.org (Postfix) with ESMTPSA id A21841F00893; Thu, 3 Dec 2026 16:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796316180; bh=J/XQcK80eO2w13ckfuQ9k6LIMp76ipFLj++GaQFTyC8=; h=From:Date:To:Subject; b=K1Pog5SLd4nVe1TcOTHuJLVD0i4cC2VlgGd5eA5tTr0LDhhpePczNJtxyblnPSm9r 2K++ckYpud77Bga+bU9Dh9uiGqqEmW3aBarE17WqC1G9nGxJl3PxNK2nLSVHMbjUfh EIbfj1Nq0t3A2h5y0sDUS9tn5uVRJ0mZHeO4IicVlgJ458+vPO84BCmhpMEdC1CVNP vtWMmDe9E3JPCNF2a+aV4fGON7HZs+QXFLEp1Ull80KtKxC3S/bi8vvQhs+6rgRZFW 6Zlj1SRBT3jRPbku/Vdehd16N0WXd1LqkkvaxjTTlCNPzxXMINOusyDz8ZSwuN61cD 56i6y0jp+Kvvw== Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id 96B743805D97; Thu, 3 Dec 2026 16:43:00 +0000 (UTC) From: Marius Dinu via Bugspray Bot Date: Thu, 03 Dec 2026 16:42:57 +0000 X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: linux-nfs@vger.kernel.org, anna@kernel.org, cel@kernel.org, jlayton@kernel.org, trondmy@kernel.org Message-ID: <20261203-b221788c0-8b47dbb925d2@bugzilla.kernel.org> Subject: NFSDv3 alone can't export btrfs dirs: mount.nfs: mount(2): Stale file handle X-Bugzilla-Product: File System X-Bugzilla-Component: NFSD X-Mailer: bugspray 0.1-dev Marius Dinu writes via Kernel.org Bugzilla: Hi. Kernel v7.2-rc4, git master branch, self-built. When built without CONFIG_NFSD_V4, all clients fail to mount directories shared from btrfs. To reproduce the bug: 1) Build a kernel with this config and boot it: # zgrep -E 'CONFIG_BTRFS|CONFIG_EXPORTFS|CONFIG_NFS' /proc/config.gz CONFIG_BTRFS_FS=y # CONFIG_BTRFS_FS_POSIX_ACL is not set # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set # CONFIG_BTRFS_DEBUG is not set # CONFIG_BTRFS_ASSERT is not set # CONFIG_BTRFS_EXPERIMENTAL is not set CONFIG_EXPORTFS=y CONFIG_EXPORTFS_BLOCK_OPS=y CONFIG_NFS_FS=y # CONFIG_NFS_V2 is not set CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set # CONFIG_NFS_V4 is not set # CONFIG_NFS_SWAP is not set # CONFIG_NFS_FSCACHE is not set CONFIG_NFS_DEBUG=y # CONFIG_NFS_DISABLE_UDP_SUPPORT is not set CONFIG_NFSD=y # CONFIG_NFSD_V2 is not set # CONFIG_NFSD_V3_ACL is not set # CONFIG_NFSD_V4 is not set CONFIG_NFS_COMMON=y # CONFIG_NFS_LOCALIO is not set 2) Start userspace daemons: rpcbind, rpc.nfsd, rpc.mountd, rpc.statd 3) Export a btrfs directory (in this example, /build): # cat /etc/exports /build -rw 172.27.143.9 # exportfs -rav exporting 172.27.143.9:/build 4) Try to mount it from a client (in this example, same machine): # mount -v -t nfs -o vers=3,softerr,timeo=10,retrans=0,fg 172.27.143.9:/build /mnt/test mount.nfs: timeout set for Sat Jul 25 10:14:23 2026 mount.nfs: trying text-based options 'vers=3,softerr,timeo=3,retrans=0,fg,addr=172.27.143.9' mount.nfs: prog 100003, trying vers=3, prot=6 mount.nfs: trying 172.27.143.9 prog 100003 vers 3 prot TCP port 2049 mount.nfs: prog 100005, trying vers=3, prot=17 mount.nfs: trying 172.27.143.9 prog 100005 vers 3 prot UDP port 56200 rpc.mountd: Received NULL request from 172.27.143.9 rpc.mountd: Received NULL request from 172.27.143.9 rpc.mountd: Received MNT3(/build) request from 172.27.143.9 rpc.mountd: v4root_create: path '/' flags 0x12403 rpc.mountd: v4root_create: path '/' flags 0x12403 rpc.mountd: authenticated mount request from 172.27.143.9:1012 for /build (/build) rpc.mountd: granted access to /build for 172.27.143.9 rpc.mountd: nfsd_fh: inbuf '172.27.143.9 0 \x0000001d00010000' rpc.mountd: denied access to 172.27.143.9 rpc.mountd: nfsd_fh: found (nil) path (null) mount.nfs: mount(2): Stale file handle mount.nfs: Stale file handle for 172.27.143.9:/build on /mnt/test Note the error: "denied access to 172.27.143.9" and "nfsd_fh: found (nil) path (null)". That's AFTER the mount request was granted. My investigation so far: - selecting CONFIG_NFSD_V4 and nothing else makes the exact same NFSv3 mount work - exports from ext2 work even without CONFIG_NFSD_V4, exact same config - adding "fsid=0" to options in /etc/exports makes it work without CONFIG_NFSD_V4 even from btrfs I suspect that NFSDv3, when v4 is not selected, uses file handles that are too short to fit files/dirs coming from btrfs. The auto-generated fsid might be too long. Thank you. Marius View: https://bugzilla.kernel.org/show_bug.cgi?id=221788#c0 You can reply to this message to join the discussion. -- Deet-doot-dot, I am a bot. Kernel.org Bugzilla (bugspray 0.1-dev)