path: root/xlators/mount/fuse/utils
diff options
authorBrian Foster <>2012-07-16 13:51:09 -0400
committerAnand Avati <>2012-07-17 08:11:48 -0700
commit59ff893d11844eb52453ce4f7f098df05fcde174 (patch)
tree25d332376a461e09770e7dfdd88e7cfc13efea4b /xlators/mount/fuse/utils
parent911603eb0e1c85e79cf261f99f442c833ead8178 (diff)
libglusterfs,mount/fuse: implement gidcache mechanism in fuse-bridge
This change genericizes the cache mechanism implemented in commit 8efd2845 into libglusterfs/src/gidcache.[ch] and adds fuse-bridge as a client. The cache mechanism is fundamentally equivalent, with some minor changes: - Change cache key from uid_t to uint64_t. - Modify the cache add logic to locate and use an entry with a matching ID, should it already exist. This addresses a bug in the existing mechanism where an expired entry supercedes a newly added entry in lookup, causing repeated adds and flushing of a cache bucket. The fuse group cache is disabled by default. It can be enabled via the 'gid-timeout' fuse-bridge translator option and accompanying mount option (i.e., '-o gid-timeout=1' for a 1s entry timeout). BUG: 800892 Change-Id: I0b34a2263ca48dbb154790a4a44fc70b733e9114 Signed-off-by: Brian Foster <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Jeff Darcy <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'xlators/mount/fuse/utils')
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mount/fuse/utils/ b/xlators/mount/fuse/utils/
index b623d3428..e585ba3b7 100755
--- a/xlators/mount/fuse/utils/
+++ b/xlators/mount/fuse/utils/
@@ -132,6 +132,10 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --entry-timeout=$entry_timeout");
+ if [ -n "$gid_timeout" ]; then
+ cmd_line=$(echo "$cmd_line --gid-timeout=$gid_timeout");
+ fi
if [ -n "$fopen_keep_cache" ]; then
cmd_line=$(echo "$cmd_line --fopen-keep-cache");
@@ -325,6 +329,7 @@ main ()
attribute_timeout=$value ;;
"entry-timeout") entry_timeout=$value ;;
+ "gid-timeout") gid_timeout=$value ;;
*) echo "unknown option $key (ignored)" ;;