summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3-fh.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-08-31 06:50:29 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-31 07:44:27 -0700
commit1cd5a6fbd345b450a0e69041b53d92fb04fdcc5a (patch)
tree0c04e76197244301d64b83b4828b40903928c09f /xlators/nfs/server/src/nfs3-fh.h
parent217fb3e2acbb221668ad5d54ef4067a2bac47c4a (diff)
nfs3: Support hashcounts larger than hash array size
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1378 (Deep directory creation crashes gnfs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1378
Diffstat (limited to 'xlators/nfs/server/src/nfs3-fh.h')
-rw-r--r--xlators/nfs/server/src/nfs3-fh.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs3-fh.h b/xlators/nfs/server/src/nfs3-fh.h
index 73e4b7817..4ee442395 100644
--- a/xlators/nfs/server/src/nfs3-fh.h
+++ b/xlators/nfs/server/src/nfs3-fh.h
@@ -44,6 +44,7 @@
typedef uint16_t nfs3_hash_entry_t;
#define GF_NFSFH_ENTRYHASH_SIZE (sizeof (nfs3_hash_entry_t))
#define GF_NFSFH_MAXHASHES ((int)(GF_NFSFH_MAX_HASH_BYTES / GF_NFSFH_ENTRYHASH_SIZE))
+#define nfs3_fh_hashcounted_size(hcount) (GF_NFSFH_STATIC_SIZE + (hcount * GF_NFSFH_ENTRYHASH_SIZE))
/* ATTENTION: Change in size of the structure below should be reflected in the
* GF_NFSFH_STATIC_SIZE.