summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-07-07 03:22:38 -0400
committerIlya Dryomov <idryomov@gmail.com>2016-07-27 21:00:45 -0400
commitc8799fc4674fe5bb9b9391f9eac202250b8370e1 (patch)
tree2033af32e00355b5f63343e9e0bd374f40b5c76c /fs/ceph/super.h
parented9b430c9ba99e70e8ddd7e08429c4c2a620ba74 (diff)
ceph: optimize cap flush waiting
Add a 'wake' flag to ceph_cap_flush struct, which indicates if there is someone waiting for it to finish. When getting flush ack message, we check the 'wake' flag in corresponding ceph_cap_flush struct to decide if we should wake up waiters. One corner case is that the acked cap flush has 'wake' flags is set, but it is not the first one on the flushing list. We do not wake up waiters in this case, set 'wake' flags of preceding ceph_cap_flush struct instead Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index b097d474f888..3e3fa9163059 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -150,6 +150,7 @@ struct ceph_cap {
150struct ceph_cap_flush { 150struct ceph_cap_flush {
151 u64 tid; 151 u64 tid;
152 int caps; /* 0 means capsnap */ 152 int caps; /* 0 means capsnap */
153 bool wake; /* wake up flush waiters when finish ? */
153 struct list_head g_list; // global 154 struct list_head g_list; // global
154 struct list_head i_list; // per inode 155 struct list_head i_list; // per inode
155}; 156};