diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-07-06 05:12:56 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-07-28 03:00:42 +0200 |
commit | e4500b5e35c213e0f97be7cb69328c0877203a79 (patch) | |
tree | 67ce2673600daf716923ac9b8675796bbd5127b1 /fs/ceph/super.h | |
parent | ceph: update types of some local varibles (diff) | |
download | linux-e4500b5e35c213e0f97be7cb69328c0877203a79.tar.xz linux-e4500b5e35c213e0f97be7cb69328c0877203a79.zip |
ceph: use list instead of rbtree to track cap flushes
We don't have requirement of searching cap flush by TID. In most cases,
we just need to know TID of the oldest cap flush. List is ideal for this
usage.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 9e82e29f86a1..29e8b7bd9413 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -189,11 +189,8 @@ static inline void ceph_put_cap_snap(struct ceph_cap_snap *capsnap) struct ceph_cap_flush { u64 tid; int caps; - struct rb_node g_node; // global - union { - struct rb_node i_node; // inode - struct list_head list; - }; + struct list_head g_list; // global + struct list_head i_list; // per inode }; /* @@ -310,7 +307,7 @@ struct ceph_inode_info { * overlapping, pipelined cap flushes to the mds. we can probably * reduce the tid to 8 bits if we're concerned about inode size. */ struct ceph_cap_flush *i_prealloc_cap_flush; - struct rb_root i_cap_flush_tree; + struct list_head i_cap_flush_list; wait_queue_head_t i_cap_wq; /* threads waiting on a capability */ unsigned long i_hold_caps_min; /* jiffies */ unsigned long i_hold_caps_max; /* jiffies */ |