Date: Sat, 13 Feb 2021 19:45:14 +0000 From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 253428] getdirentries does not work correctly on NFS mounts Message-ID: <bug-253428-3630-waxM5O41GH@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-253428-3630@https.bugs.freebsd.org/bugzilla/> References: <bug-253428-3630@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253428 --- Comment #9 from Konstantin Belousov <kib@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 =3D=3D 0 and ju= mping 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 li= fted 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 a= nd avoided skip? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253428-3630-waxM5O41GH>