freebsd-skq/sys/fs/tmpfs
gleb 97e76936ec tmpfs: Replace directory entry linked list with RB-Tree.
Use file name hash as a tree key, handle duplicate keys.  Both VOP_LOOKUP
and VOP_READDIR operations utilize same tree for search.  Directory
entry offset (cookie) is either file name hash or incremental id in case
of hash collisions (duplicate-cookies).  Keep sorted per directory list
of duplicate-cookie entries to facilitate cookie number allocation.

Don't fail if previous VOP_READDIR() offset is no longer valid, start
with next dirent instead.  Other file system handle it similarly.

Workaround race prone tn_readdir_last[pn] fields update.

Add tmpfs_dir_destroy() to free all dirents.

Set NFS cookies in tmpfs_dir_getdents(). Return EJUSTRETURN from
tmpfs_dir_getdents() instead of hard coded -1.

Mark directory traversal routines static as they are no longer
used outside of tmpfs_subr.c
2013-01-06 22:15:44 +00:00
..
tmpfs_fifoops.c
tmpfs_fifoops.h
tmpfs_subr.c tmpfs: Replace directory entry linked list with RB-Tree. 2013-01-06 22:15:44 +00:00
tmpfs_vfsops.c tmpfs: Replace directory entry linked list with RB-Tree. 2013-01-06 22:15:44 +00:00
tmpfs_vnops.c tmpfs: Replace directory entry linked list with RB-Tree. 2013-01-06 22:15:44 +00:00
tmpfs_vnops.h
tmpfs.h tmpfs: Replace directory entry linked list with RB-Tree. 2013-01-06 22:15:44 +00:00