diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-07-07 09:22:38 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-07-28 03:00:45 +0200 |
commit | c8799fc4674fe5bb9b9391f9eac202250b8370e1 (patch) | |
tree | 2033af32e00355b5f63343e9e0bd374f40b5c76c /fs/ceph/super.h | |
parent | ceph: cleanup ceph_flush_snaps() (diff) | |
download | linux-c8799fc4674fe5bb9b9391f9eac202250b8370e1.tar.xz linux-c8799fc4674fe5bb9b9391f9eac202250b8370e1.zip |
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.h | 1 |
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 { struct ceph_cap_flush { u64 tid; int caps; /* 0 means capsnap */ + bool wake; /* wake up flush waiters when finish ? */ struct list_head g_list; // global struct list_head i_list; // per inode }; |