summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/list.h
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2013-06-21 11:31:11 +0530
committerAnand Avati <avati@redhat.com>2013-06-21 10:33:49 -0700
commit3f72e52c936edf7d1477a69fa3a01f89e0576881 (patch)
tree633d418eef5eef2677ba8db6a1d43e13f983a14b /libglusterfs/src/list.h
parent4cde70a0e5be0a5e49e42c48365f3c0b205f9741 (diff)
rpc: duplicate request cache for nfs
Duplicate request cache provides a mechanism for detecting duplicate rpc requests from clients. DRC caches replies and on duplicate requests, sends the cached reply instead of re-processing the request. Change-Id: I3d62a6c4aa86c92bf61f1038ca62a1a46bf1c303 BUG: 847624 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4049 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/list.h')
-rw-r--r--libglusterfs/src/list.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libglusterfs/src/list.h b/libglusterfs/src/list.h
index 35fccdf25a5..7f3712b51b4 100644
--- a/libglusterfs/src/list.h
+++ b/libglusterfs/src/list.h
@@ -175,4 +175,16 @@ list_append_init (struct list_head *list, struct list_head *head)
&pos->member != (head); \
pos = n, n = list_entry(n->member.next, typeof(*n), member))
+#define list_for_each_entry_reverse(pos, head, member) \
+ for (pos = list_entry((head)->prev, typeof(*pos), member); \
+ &pos->member != (head); \
+ pos = list_entry(pos->member.prev, typeof(*pos), member))
+
+
+#define list_for_each_entry_safe_reverse(pos, n, head, member) \
+ for (pos = list_entry((head)->prev, typeof(*pos), member), \
+ n = list_entry(pos->member.prev, typeof(*pos), member); \
+ &pos->member != (head); \
+ pos = n, n = list_entry(n->member.prev, typeof(*n), member))
+
#endif /* _LLIST_H */