[Bug 253428] getdirentries does not work correctly on NFS mounts
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Feb 13 19:45:14 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253428
--- Comment #9 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to Rick Macklem from comment #8)
I think these are different things.
In NFS nfsrpc_readdirplus(), there is special code just to fill the incoming
buffer with empty dirents (now I found it). I mean the bloc near the end,
under the comment
'Add extra empty records to any remaining DIRBLKSIZ chunks.'
There is nothing comparable to that in UFS. As I understand, you are
complaining
about UFS code which skips empty dirents (by checking d_ino == 0 and jumping to
nextentry). But there is no code to fabricate dummy dirents at the end to
fill up to the end of uio.
Why this code is needed for NFS? To fill the buffer, so that the situation
you described with 6K/8K skew cannot occur?
Also, I do not think that the code to skip empty dirents from UFS can be lifted
to VFS layer. Problem is that VOP_READDIR() has to do uiomove()s itself, so
the
skip must occur in VOP.
Would it be useful if UFS know that ufs_readdir() is called by NFS server and
avoided skip?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-fs
mailing list