summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient-internals.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-06-03 01:31:37 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-03 00:39:59 -0700
commit57dc67ce5583ebaaa8c96900b6f279752b896e31 (patch)
tree2858ab742c416a380f238b4d27e36a1bf6bce216 /libglusterfsclient/src/libglusterfsclient-internals.h
parentb896ec15fb123b77025394d53f019f7fa12bad3e (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-xlibglusterfsclient/src/libglusterfsclient-internals.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient-internals.h b/libglusterfsclient/src/libglusterfsclient-internals.h
index 40ad6f692..42ce5d4ca 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