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=1796316155; b=iCGdmQ+hiXQevZDwWM4ZOD94glkvhBYrClm56ekuDKKYm3iy6Psos7vIF7A9V9s70cwF 23nTuIFN/kf9AWtfqR9S0wu3C9q1KeNZiSoK9xokKJLbH+1TDj/+D983QprayUP1MiFNK KrlUez2iwe+nDcqMnPruDKT3p/ec6m5cHmsMdzLn7ddu6l7XdbL9Y40eZUNzHHKBShqK2 R5ikzhuv6rxSM9nteVAKvTJpMZUvmok+Z9q+xCNUe6422z9pYFVI9mD2PhXbJdYYenWPd 2ScdwoGW4mRJ0aWTPiuGN1Uw4zcqSJMNC5ubvLOA/ScwRIQsndoQYsJMvVukFdUgD4A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796316155; 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=ASWzdS5K+9iJ3dIdiyo6Cjb9aKWCNKzpkA62rJt9TU4=; b=hXzeOT/oEbXW+dFmh/gKtoKptbyV8iMqvljvglI4nDTwavPeMjqdZeHAF0DhB1BQP6W+ 8PM5857ch/dH2PtKzXMsn4MSedBPf71FYz0r+WNPBt5URCof9o8gNb8waeUux0tkEiqh8 dbNNPDxFKE7hn3zPbXMmzU9zkr3SqCN4MybPYGIbjcuNvI4mQMdp1xnXvUPTZDaWOtP0y Z6xdeu7xrb30mrVFcNlfioh3BAxz+cptiHRdkKUJqUUC7epD4lhUoQIIDxvVXDstTPM7t 6351Y6dcKUzzWs+lGBP6szgyHrMNn6Vnflo1leM/g9Vc7Vs3a24O+BXQAGaOiHDbZvA== 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=PsiZhNOU; 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 C9265606A333 for ; Thu, 3 Dec 2026 16:42:35 +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=PsiZhNOU Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2BBA1F0089A; Thu, 3 Dec 2026 16:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796316155; bh=ASWzdS5K+9iJ3dIdiyo6Cjb9aKWCNKzpkA62rJt9TU4=; h=From:Date:To:Subject; b=PsiZhNOUqqUz7gsTTUWYSlYjW+Nq9+tXyo6NZXHlCQkZu9GoBRgRmXeLvxWD+8AoC QiBVNLUFKw3ZOa4qHjCZNhXasCsOnMGimlsbOZQf+EP5yZoCcMBCbbQ/8+KT5gOWYh 3iF8ZBHb0i1/Fx2nRu4h4cv89UKNH9pkZYBTSv/XUuFrhmTlp7XIOGNqsqmJjS/t4Z EpJukcFR86lzg5FhaoI/C6TMB3FNXNQZ05VJDSJ2cD7E/ClVo/ELH3OwZNxqxsj5ys Dyto+oX0e21iLzpa/FVLcI9Uv/g5S9AFy2t9OqV+MvpQX0lf+90heCech7x/BrXz5T Pj++bhaEyu5oA== Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id 96C4A3805D97; Thu, 3 Dec 2026 16:42:35 +0000 (UTC) From: "kernel.zie66 via Bugspray Bot" Date: Thu, 03 Dec 2026 16:42:32 +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-b221261c0-40c5a906b999@bugzilla.kernel.org> Subject: NFSv4 client: statx() returns EINVAL after readdir on same directory (kernel 7.0.0) X-Bugzilla-Product: File System X-Bugzilla-Component: NFSD X-Mailer: bugspray 0.1-dev kernel.zie66 writes via Kernel.org Bugzilla: On kernel 7.0.0-7-generic (Ubuntu 26.04), statx() on an NFSv4-mounted directory returns -EINVAL after readdir has been called on that directory. The fstatat() syscall on the same path succeeds. The error is transient since a subsequent statx() call succeeds. NFSv3 is unaffected. This breaks Go programs (which use statx since Go 1.22), Rust coreutils (default on Ubuntu 26.04), and containerd/Kubernetes pod startup. Reproduction: mount -t nfs4 server:/export /mnt/nfs python3 -c " import ctypes, os libc = ctypes.CDLL('libc.so.6', use_errno=True) class Statx(ctypes.Structure): _fields_ = [('stx_mask',ctypes.c_uint32),('stx_blksize',ctypes.c_uint32), ('stx_attributes',ctypes.c_uint64),('stx_nlink',ctypes.c_uint32), ('stx_uid',ctypes.c_uint32),('stx_gid',ctypes.c_uint32), ('stx_mode',ctypes.c_uint16),('stx_pad1',ctypes.c_uint16), ('stx_ino',ctypes.c_uint64),('stx_size',ctypes.c_uint64), ('stx_blocks',ctypes.c_uint64),('stx_attributes_mask',ctypes.c_uint64), ('rest',ctypes.c_byte*256)] path = b'/mnt/nfs/' def do_statx(label): buf = Statx() ret = libc.statx(-100, path, 0x100, 0x0fff, ctypes.byref(buf)) err = ctypes.get_errno() print(f'{label}: ret={ret} errno={err}') do_statx('before readdir') os.listdir('/mnt/nfs/') do_statx('after readdir') # <-- returns -EINVAL os.stat('/mnt/nfs/') # fstatat works fine do_statx('after fstatat') # healed, works again " Server-side traces (nfsd tracepoints) show all operations returning status=0, and the error is generated entirely client-side. Backend filesystem is bcachefs (DKMS module), but this appears to be an NFS client issue since the server reports success. View: https://bugzilla.kernel.org/show_bug.cgi?id=221261#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)