summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-15 12:08:46 -0800
committerSage Weil <sage@newdream.net>2010-02-16 22:01:08 -0800
commit44ca18f2682eb1cfbed153849adedb79e3e19790 (patch)
tree063dd8382179e65717ec10dc1ffc135950050abd /fs/ceph/mds_client.h
parent91e45ce38946a8efa21fefbc65d023ca3c0b434f (diff)
downloadop-kernel-dev-44ca18f2682eb1cfbed153849adedb79e3e19790.zip
op-kernel-dev-44ca18f2682eb1cfbed153849adedb79e3e19790.tar.gz
ceph: use rbtree for mds requests
The rbtree is a more appropriate data structure than a radix_tree. It avoids extra memory usage and simplifies the code. It also fixes a bug where the debugfs 'mdsc' file wasn't including the most recent mds request. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index ee71495..98f09cd 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -6,6 +6,7 @@
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/radix-tree.h>
+#include <linux/rbtree.h>
#include <linux/spinlock.h>
#include "types.h"
@@ -150,6 +151,7 @@ typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc,
*/
struct ceph_mds_request {
u64 r_tid; /* transaction id */
+ struct rb_node r_node;
int r_op; /* mds op code */
int r_mds;
@@ -249,7 +251,7 @@ struct ceph_mds_client {
spinlock_t snap_empty_lock; /* protect snap_empty */
u64 last_tid; /* most recent mds request */
- struct radix_tree_root request_tree; /* pending mds requests */
+ struct rb_root request_tree; /* pending mds requests */
struct delayed_work delayed_work; /* delayed work */
unsigned long last_renew_caps; /* last time we renewed our caps */
struct list_head cap_delay_list; /* caps with delayed release */
OpenPOWER on IntegriCloud