[Libsysio-commit] cplant: libsysio/include inode.h
Brought to you by:
lward
From: Ruth K. <rk...@us...> - 2003-07-24 22:53:00
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1:/tmp/cvs-serv19555/include Modified Files: Tag: cplant inode.h Log Message: Add capability of checking inode generation numbers, if a field for it exists in the stat struct. Bug fix for unlink/creat failure: Changes allow re-use of an inode which is no longer in use, but still exists in the inode cache. If the stat info for the new use matches cached info, the inode is re-used. If not, the old inode is marked 'zombie' and removed from the inode cache to make way for the new inode. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -u -w -b -B -p -r1.4.2.1 -r1.4.2.2 --- inode.h 28 Apr 2003 20:43:50 -0000 1.4.2.1 +++ inode.h 24 Jul 2003 22:52:57 -0000 1.4.2.2 @@ -129,6 +129,7 @@ struct inode_ops { struct inode { LIST_ENTRY(inode) i_link; /* FS i-nodes link */ unsigned i_immune : 1; /* immune from GC */ + unsigned i_zombie : 1; /* stale inode */ unsigned i_ref; /* soft ref counter */ ino_t i_num; /* i-num (deprecate!) */ mode_t i_mode; /* mode (see stat.h) */ @@ -146,6 +147,7 @@ struct inode { #define I_INIT(ino, fs, inum, mode, rdev, ops, fid, immunity, private) \ do { \ (ino)->i_immune = (immunity) ? 1 : 0; \ + (ino)->i_zombie = 0; \ (ino)->i_ref = 0; \ (ino)->i_num = (inum); \ (ino)->i_mode = (mode); \ @@ -407,6 +409,7 @@ extern struct inode *_sysio_i_find(struc ino_t ino, struct file_identifier *fid); extern void _sysio_i_gone(struct inode *ino); +extern void _sysio_i_undead(struct inode *ino); extern int _sysio_p_find_alias(struct pnode *parent, struct qstr *name, struct pnode **pnop); |