Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Dec 2021 21:59:17 -0500
From:      Alexander Motin <mav@FreeBSD.org>
To:        Alan Somers <asomers@freebsd.org>, FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: Fixing VOP_READDIR for 64-bit directory cookies
Message-ID:  <95f70cff-e02e-7f05-f529-1978667f651e@FreeBSD.org>
In-Reply-To: <CAOtMX2goj0BV_okJUpPwofeso1XRZjgKA6p5wL2ZdVN5otjH1w@mail.gmail.com>
References:  <CAOtMX2goj0BV_okJUpPwofeso1XRZjgKA6p5wL2ZdVN5otjH1w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13.12.2021 21:47, Alan Somers wrote:
> 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?

Since changing the VOP_READDIR argument type will probably break
external file system modules I'd say it is not acceptable for MFC.  But
merge of the NFS part only should fix the issue for the 64-bit machines,
which should be good enough for the most people.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95f70cff-e02e-7f05-f529-1978667f651e>