Subject: Caching status between VOP_READDIR calls
To: None <tech-kern@NetBSD.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-kern
Date: 09/08/2005 17:50:48
Hi everybody,
during the initial stages of tmpfs, I added some variables to its
code to cache the status of reads between VOP_READDIR
calls. These variables are used to continue reading from the
middle of the directory without having to traverse it again to the
point where the read starts. (Given the way it is coded, this is
useless if two concurrent reads are active, because each of
them will overwrite the values, thus invalidating them.)
But recently, while implementing the NFS support, I added the
cookies functionality to the tmpfs_readdir function. Although
vnodeops(9) says that these are used by the NFS server (to
restart reads from the middle of the directory), it seems to me
that they are used in more cases. I think this because, even if
I disable NFSSERVER from the kernel, the system exposed
some mistakes I had in the cookie handling code.
So the question is... are the cookies used in all kinds of reads?
Or maybe they aren't, butl the system know where to restart a
readdir operation in some other way? If so, I will simply get rid
of my custom variables.
Thank you,
--=20
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/