[Libsysio-commit] HEAD: libsysio/include inode.h
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-09-21 19:41:40
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv759/include Modified Files: inode.h Log Message: The pnode base name cache is now maintained as a hashed table of trees, instead of lists. The pnode base record was re-organized. The qstr name record and parent were grouped under a pnodE_base_key sub-record and the new field named pb_key. As well, the LIST_ENTRY for pb_names was removed and a struct tree record added, reflecting the conversion to trees from lists in the hash table slots. + Fixed an issue in inode.c where the pnode base nodes were being reclaimed wholesale, instead of partially, on every call to the garbage collector. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -w -b -B -p -r1.32 -r1.33 --- inode.h 14 May 2007 15:47:30 -0000 1.32 +++ inode.h 21 Sep 2007 19:41:37 -0000 1.33 @@ -41,6 +41,8 @@ * le...@sa... */ +#include "tree.h" + #if defined(AUTOMOUNT_FILE_NAME) && !defined(MAX_MOUNT_DEPTH) /* * Maximum number of automounts to attempt in path traversal. @@ -205,13 +207,15 @@ struct qstr { * common information. */ struct pnode_base { - struct qstr pb_name; /* entry name */ + struct tree_node pb_tentry; /* cache node entry */ + struct pnode_base_key { + struct qstr pbk_name; /* entry name */ + struct pnode_base *pbk_parent; /* parent */ + } pb_key; struct inode *pb_ino; /* inode */ LIST_HEAD(, pnode_base) pb_children; /* children if a dir */ LIST_ENTRY(pnode_base) pb_sibs; /* links to siblings */ - LIST_ENTRY(pnode_base) pb_names; /* near names links */ LIST_HEAD(, pnode) pb_aliases; /* aliases */ - struct pnode_base *pb_parent; /* parent */ }; /* |