diff options
author | Anand Avati <avati@gluster.com> | 2010-09-03 13:58:48 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-04 01:45:06 -0700 |
commit | ac60a2a7f3c7b07830669e282d9fc796cbc78f38 (patch) | |
tree | e99cb728b67e18498440fd55c2ab46b0a5c16d06 /libglusterfs/src/inode.h | |
parent | 2822157056d8347518f7e1b8bf9ee04bea7286ae (diff) |
gfid: changes in inode management
- incorporate usage of uuid (gfid) as the key for finding inodes
- deprecate inode number/generation number based inode_get
- undo code specific to generation numbers (attic list etc.)
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'libglusterfs/src/inode.h')
-rw-r--r-- | libglusterfs/src/inode.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/libglusterfs/src/inode.h b/libglusterfs/src/inode.h index a0bb8f8b5..71d533669 100644 --- a/libglusterfs/src/inode.h +++ b/libglusterfs/src/inode.h @@ -60,13 +60,9 @@ struct _inode_table { struct list_head purge; /* list of inodes to be purged soon */ uint32_t purge_size; /* count of inodes in purge list */ - struct list_head attic; /* list of inodes which do not have the latest generation - number. inode_t's @hash is linked with @attic. It is - otherwise linked with @inode_hash */ - uint32_t attic_size; struct mem_pool *inode_pool; /* memory pool for inodes */ struct mem_pool *dentry_pool; /* memory pool for dentrys */ - struct mem_pool *fd_mem_pool; /* memory pool for fd_t */ + struct mem_pool *fd_mem_pool; /* memory pool for fd_t */ }; @@ -98,8 +94,6 @@ struct _inode { uuid_t gfid; gf_lock_t lock; uint64_t nlookup; - uint64_t generation; - uint32_t in_attic; /* whether @hash is linked with @inode_hash or @attic */ uint32_t ref; /* reference count on this inode */ ino_t ino; /* inode number in the storage (persistent) */ ia_type_t ia_type; /* what kind of file */ @@ -119,9 +113,6 @@ inode_t * inode_new (inode_table_t *table); inode_t * -inode_search (inode_table_t *table, ino_t ino, const char *name); - -inode_t * inode_link (inode_t *inode, inode_t *parent, const char *name, struct iatt *stbuf); @@ -154,28 +145,28 @@ inode_grep (inode_table_t *table, inode_t *parent, const char *name); inode_t * inode_get (inode_table_t *table, ino_t ino, uint64_t gen); +inode_t * +inode_find (inode_table_t *table, uuid_t gfid); + int inode_path (inode_t *inode, const char *name, char **bufp); inode_t * inode_from_path (inode_table_t *table, const char *path); -dentry_t * -dentry_search_for_inode (inode_t *inode, ino_t par, const char *name); - int __inode_ctx_put (inode_t *inode, xlator_t *xlator, uint64_t value); int inode_ctx_put (inode_t *inode, xlator_t *xlator, uint64_t value); -int +int __inode_ctx_get (inode_t *inode, xlator_t *xlator, uint64_t *value); -int +int inode_ctx_get (inode_t *inode, xlator_t *xlator, uint64_t *value); -int +int inode_ctx_del (inode_t *inode, xlator_t *xlator, uint64_t *value); int |