From 1d38ec6ce40279d7e8ef2b5a9bd59a2d289eca23 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 24 Nov 2011 15:42:55 +0530 Subject: fuse: bring in the reverse invalidation Thanks to Csaba Henk for the patch Currently one can invalidate the inodes using 'setxattr()' with key 'inode-invalidate' (and any value). This can be further extended to do a purge of inode table itself. Change-Id: I165d5d585ed808b9e463ac0aad859ec64568c7a2 BUG: 762277 Signed-off-by: Amar Tumballi Reviewed-on: http://review.gluster.com/324 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mount/fuse/src/fuse-bridge.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xlators/mount/fuse/src/fuse-bridge.h') diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h index b7ca9b08e43..39b54f6fe32 100644 --- a/xlators/mount/fuse/src/fuse-bridge.h +++ b/xlators/mount/fuse/src/fuse-bridge.h @@ -109,9 +109,20 @@ struct fuse_private { unsigned uid_map_root; gf_boolean_t acl; gf_boolean_t read_only; + + /* For fuse-reverse-validation */ + int revchan_in; + int revchan_out; + gf_boolean_t reverse_fuse_thread_started; }; typedef struct fuse_private fuse_private_t; +#define INVAL_BUF_SIZE (sizeof (struct fuse_out_header) + \ + max (sizeof (struct fuse_notify_inval_inode_out), \ + sizeof (struct fuse_notify_inval_entry_out) + \ + NAME_MAX + 1)) + + #define _FH_TO_FD(fh) ((fd_t *)(uintptr_t)(fh)) #define FH_TO_FD(fh) ((_FH_TO_FD (fh))?(fd_ref (_FH_TO_FD (fh))):((fd_t *) 0)) -- cgit