]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/cls/lock/cls_lock_types.h
import ceph nautilus 14.2.2
[ceph.git] / ceph / src / cls / lock / cls_lock_types.h
index 75796996e7b5f65cb9babea3b58a35a48a7725ae..fbd5b571e938d705e075f7aae740020cf5d30607 100644 (file)
@@ -85,6 +85,11 @@ namespace rados {
           return false;
         }
         void dump(Formatter *f) const;
+       friend std::ostream& operator<<(std::ostream& out,
+                                       const locker_id_t& data) {
+         out << data.locker;
+         return out;
+       }
         static void generate_test_instances(list<locker_id_t*>& o);
       };
       WRITE_CLASS_ENCODER(locker_id_t)
@@ -114,6 +119,19 @@ namespace rados {
           DECODE_FINISH(bl);
         }
         void dump(Formatter *f) const;
+       friend std::ostream& operator<<(std::ostream& out,
+                                       const locker_info_t& data) {
+         out << "{addr:" << data.addr << ", exp:";
+
+         const auto& exp = data.expiration;
+         if (exp.is_zero()) {
+           out << "never}";
+         } else {
+           out << exp.to_real_time() << "}";
+         }
+
+         return out;
+       }
         static void generate_test_instances(list<locker_info_t *>& o);
       };
       WRITE_CLASS_ENCODER_FEATURES(locker_info_t)