diff options
author | John Spray <john.spray@redhat.com> | 2014-09-10 14:37:37 +0200 |
---|---|---|
committer | John Spray <john.spray@redhat.com> | 2014-09-15 16:05:14 +0200 |
commit | bf590f8a5df4f8199d524e3448853f0f6f8338c9 (patch) | |
tree | b6b4009678f6cf74e56e3811bd49f6a063930eb5 /src/mds/Capability.h | |
parent | xlist: implement copy constructor (diff) | |
download | ceph-bf590f8a5df4f8199d524e3448853f0f6f8338c9.tar.xz ceph-bf590f8a5df4f8199d524e3448853f0f6f8338c9.zip |
mds: keep per-client revoking caps list
...to avoid doing an O(caps) scan to find out
which clients are responsible for any late-revoking
caps during health checks.
Signed-off-by: John Spray <john.spray@redhat.com>
Diffstat (limited to 'src/mds/Capability.h')
-rw-r--r-- | src/mds/Capability.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mds/Capability.h b/src/mds/Capability.h index 53ac91da2cf..113a010089a 100644 --- a/src/mds/Capability.h +++ b/src/mds/Capability.h @@ -195,8 +195,10 @@ public: } } - if (_issued == _pending) + if (_issued == _pending) { item_revoking_caps.remove_myself(); + item_client_revoking_caps.remove_myself(); + } //check_rdcaps_list(); } // we may get a release racing with revocations, which means our revokes will be ignored @@ -231,6 +233,7 @@ public: xlist<Capability*>::item item_session_caps; xlist<Capability*>::item item_snaprealm_caps; xlist<Capability*>::item item_revoking_caps; + xlist<Capability*>::item item_client_revoking_caps; Capability(CInode *i = NULL, uint64_t id = 0, client_t c = 0) : inode(i), client(c), @@ -243,7 +246,8 @@ public: suppress(0), state(0), client_follows(0), client_xattr_version(0), client_inline_version(0), - item_session_caps(this), item_snaprealm_caps(this), item_revoking_caps(this) { + item_session_caps(this), item_snaprealm_caps(this), + item_revoking_caps(this), item_client_revoking_caps(this) { g_num_cap++; g_num_capa++; } |