]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: equality operator for managed_lock::Locker
authorMykola Golub <mgolub@mirantis.com>
Mon, 30 Jan 2017 14:52:31 +0000 (15:52 +0100)
committerMykola Golub <mgolub@mirantis.com>
Wed, 1 Feb 2017 09:55:03 +0000 (10:55 +0100)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/librbd/managed_lock/Types.h

index 01c31b6dfb7275f86379def243dbad07549b956f..c03aa7c9a5b674b409efa1c1d522edb996c7b9f6 100644 (file)
@@ -15,6 +15,13 @@ struct Locker {
   std::string cookie;
   std::string address;
   uint64_t handle;
+
+  inline bool operator==(const Locker &rhs) const {
+    return (entity == rhs.entity &&
+            cookie == rhs.cookie &&
+            address == rhs.address &&
+            handle == rhs.handle);
+  }
 };
 
 enum Mode {