Fixing VOP_READDIR for 64-bit directory cookies
- Reply: Alexander Motin : "Re: Fixing VOP_READDIR for 64-bit directory cookies"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Dec 2021 02:47:34 UTC
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