Date: Mon, 13 Dec 2021 19:47:34 -0700 From: Alan Somers <asomers@freebsd.org> To: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Fixing VOP_READDIR for 64-bit directory cookies Message-ID: <CAOtMX2goj0BV_okJUpPwofeso1XRZjgKA6p5wL2ZdVN5otjH1w@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
tldr; this change allows the NFS server to export file systems that use 64-bit directory cookies https://reviews.freebsd.org/D33404 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260375 Long story: NFSv2 included a 32-bit directory cookie with each readdir entry. NFSv3 widened it to 64-bits, and FreeBSD's SVN r22521 raised VOP_READDIR's cookies argument to a u_long. That's 64-bits on some architectures, but 32-bits on others. But since the NFS server is the only caller that uses cookies, VOP_READDIR really ought to use a 64-bit type on all architectures. For NVSv2-exported file systems, the NFS server will ignore the top 32-bits of the cookie. There are no in-tree file systems that use more than 32 bits for their directory cookies, but it matters for some FUSE file systems. Does anybody have any opinions about this change, or about whether/how to MFC it? -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2goj0BV_okJUpPwofeso1XRZjgKA6p5wL2ZdVN5otjH1w>