ceph: use rbtree for snap_realms

Switch from radix tree to rbtree for snap realms.  This is much more
appropriate given that realm keys are few and far between.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil
2010-02-15 14:37:55 -08:00
parent 44ca18f268
commit a105f00cf1
4 changed files with 47 additions and 23 deletions
+1 -2
View File
@@ -5,7 +5,6 @@
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/radix-tree.h>
#include <linux/rbtree.h>
#include <linux/spinlock.h>
@@ -246,7 +245,7 @@ struct ceph_mds_client {
* should be destroyed.
*/
struct rw_semaphore snap_rwsem;
struct radix_tree_root snap_realms;
struct rb_root snap_realms;
struct list_head snap_empty;
spinlock_t snap_empty_lock; /* protect snap_empty */