https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292282

--- Comment #6 from Rick Macklem <[email protected]> ---
(In reply to Martin Cracauer from comment #5)
The NFS client always returns a full block as
requested by the syscall.

The block is filled out with entries of 512bytes
with d_fileno == 0.  On FreeBSD (and 4BSD for that
matter), entries with d_fileno/d_ino == 0 are ignored.

I suspect that Linux does not ignore these entries,
but it is just a hunch.

Note that getdents(2) is not a POSIX standard, so
it is not surprising that it is not Linux compatible.

If there is some other way Linux marks directory
entries to be ignored, then the syscall emulator
could translate them.
Otherwise, I do not see a way to fix this.
I do not know what the Linux syscall is expected
to return. (You cannot just throw away ignored
entries. Doing that will break the offset of the
next block.)

I won't bore you with the details, but on FreeBSD
the NFS blocks are cached in the buffer cache and
creating a short one as the last block results in
breakage of the caching. (I patched it that way
once, but someone spotted that the cache hit rate
dropped significantly.)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to