summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-07-04 06:20:07 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-06 05:58:52 -0700
commit4e14d858bc51f99d89880364249344e1b957f400 (patch)
tree1d2a77c319d9d24f41706a8d03b60d4c05b0a9f8 /xlators/nfs/server/src/nfs3.h
parent1a7f42d7fb73f464f18c4375e3b4ef8139f20d1c (diff)
nfs3: Fix race updating op queue on uncached fd open
The order of locking while performing async fd opens was resulting in a deadlock when a particular pattern of operations was generated by compilebench. This patch improves handling of those situations while locking the fd-cache, inode and inode queue. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1047 (Compilebench hangs nfs server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1047
Diffstat (limited to 'xlators/nfs/server/src/nfs3.h')
-rw-r--r--xlators/nfs/server/src/nfs3.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs3.h b/xlators/nfs/server/src/nfs3.h
index ccdad447735..1565f26345b 100644
--- a/xlators/nfs/server/src/nfs3.h
+++ b/xlators/nfs/server/src/nfs3.h
@@ -199,6 +199,14 @@ struct nfs3_local {
typedef struct nfs3_local nfs3_call_state_t;
+/* Queue of ops waiting for open fop to return. */
+struct inode_op_queue {
+ struct list_head opq;
+ pthread_mutex_t qlock;
+};
+
+
+
extern rpcsvc_program_t *
nfs3svc_init (xlator_t *nfsx);