[Libsysio-commit] HEAD: libsysio/include inode.h
Brought to you by:
lward
|
From: Lee W. <lw...@us...> - 2003-10-15 18:01:01
|
Update of /cvsroot/libsysio/libsysio/include
In directory sc8-pr-cvs1:/tmp/cvs-serv9577/include
Modified Files:
inode.h
Log Message:
Eliminated the i-node number field from the inode structure. We already
carry the file identifier so it was redundant. Problematic too, in that
it can be 32 or 64 bits in size.
This forced _sysio_i_new() and _sysio_i_find() to change -- They no longer
take the i-node number as an argument. Updated the driver calls to reflect
the new usage.
The i-node cache is now indexed by hashing the file identifier as opposed
to just using the, no longer maintained, i-node number. This caused
_sysio_i_find to become 2+ percent more expensive to use. Acceptable
for me.
Index: inode.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -b -B -p -r1.11 -r1.12
--- inode.h 13 Oct 2003 01:04:35 -0000 1.11
+++ inode.h 15 Oct 2003 18:00:56 -0000 1.12
@@ -134,7 +134,6 @@ struct inode {
i_immune : 1, /* immune from GC */
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) */
dev_t i_rdev; /* dev (if device) */
struct inode_ops i_ops; /* operations */
@@ -147,12 +146,11 @@ struct inode {
/*
* Init an i-node record.
*/
-#define I_INIT(ino, fs, inum, mode, rdev, ops, fid, immunity, private) \
+#define I_INIT(ino, fs, 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); \
(ino)->i_rdev = (rdev); \
(ino)->i_ops = *(ops); \
@@ -403,7 +401,6 @@ extern TAILQ_HEAD(pnodes_head, pnode) _s
extern int _sysio_i_init(void);
extern struct inode *_sysio_i_new(struct filesys *fs,
- ino_t ino,
struct file_identifier *fid,
mode_t type,
dev_t rdev,
@@ -411,7 +408,6 @@ extern struct inode *_sysio_i_new(struct
struct inode_ops *ops,
void *private);
extern struct inode *_sysio_i_find(struct filesys *fs,
- ino_t ino,
struct file_identifier *fid);
extern void _sysio_i_gone(struct inode *ino);
extern void _sysio_i_undead(struct inode *ino);
|