diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2009-06-03 01:31:37 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-06-03 00:25:55 -0700 |
commit | bc99744f209d2c6905f858e9ab44d09fb661e94a (patch) | |
tree | 455c3a2a1bbad77cbe5eef145cda7a8499ddf96b /libglusterfsclient/src/libglusterfsclient-internals.h | |
parent | f47f568aa0fd8d12c211e3b249fcf7a67ec56f9e (diff) |
libglusterfsclient: Simplify inode and stat caching
There is a mechanism for caching the inode numbers got from a lookup
and a struct stat got from a stat or fstat but I wasnt sure if it worked.
This commit simplifies cache updates and checks and the accompanying
tests have made sure that the cache does work.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient-internals.h')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient-internals.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient-internals.h b/libglusterfsclient/src/libglusterfsclient-internals.h index 40ad6f6929f..42ce5d4cac0 100755 --- a/libglusterfsclient/src/libglusterfsclient-internals.h +++ b/libglusterfsclient/src/libglusterfsclient-internals.h @@ -235,5 +235,18 @@ struct vmp_entry { glusterfs_handle_t handle; }; +#define LIBGF_UPDATE_LOOKUP 0x1 +#define LIBGF_UPDATE_STAT 0x2 +#define LIBGF_UPDATE_ALL (LIBGF_UPDATE_LOOKUP | LIBGF_UPDATE_STAT) + +#define LIBGF_VALIDATE_LOOKUP 0x1 +#define LIBGF_VALIDATE_STAT 0x2 + +int +libgf_is_iattr_cache_valid (libglusterfs_client_ctx_t *ctx, inode_t *inode, + struct stat *sbuf, int flags); + +int +libgf_update_iattr_cache (inode_t *inode, int flags, struct stat *buf); #endif |