]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/cls/lock/cls_lock_types.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / cls / lock / cls_lock_types.h
index 5f44126b4879d4134d99cfd4104055fd189602f9..75796996e7b5f65cb9babea3b58a35a48a7725ae 100644 (file)
@@ -20,7 +20,7 @@ enum ClsLockType {
   LOCK_EXCLUSIVE_EPHEMERAL = 3, /* lock object is removed @ unlock */
 };
 
-static inline const char *cls_lock_type_str(ClsLockType type)
+inline const char *cls_lock_type_str(ClsLockType type)
 {
     switch (type) {
       case LOCK_NONE:
@@ -66,14 +66,14 @@ namespace rados {
 
         void encode(bufferlist &bl) const {
           ENCODE_START(1, 1, bl);
-          ::encode(locker, bl);
-          ::encode(cookie, bl);
+          encode(locker, bl);
+          encode(cookie, bl);
           ENCODE_FINISH(bl);
         }
-        void decode(bufferlist::iterator &bl) {
+        void decode(bufferlist::const_iterator &bl) {
           DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl);
-          ::decode(locker, bl);
-          ::decode(cookie, bl);
+          decode(locker, bl);
+          decode(cookie, bl);
           DECODE_FINISH(bl);
         }
 
@@ -87,7 +87,7 @@ namespace rados {
         void dump(Formatter *f) const;
         static void generate_test_instances(list<locker_id_t*>& o);
       };
-      WRITE_CLASS_ENCODER(rados::cls::lock::locker_id_t)
+      WRITE_CLASS_ENCODER(locker_id_t)
 
       struct locker_info_t
       {
@@ -101,22 +101,22 @@ namespace rados {
 
         void encode(bufferlist &bl, uint64_t features) const {
           ENCODE_START(1, 1, bl);
-          ::encode(expiration, bl);
-          ::encode(addr, bl, features);
-          ::encode(description, bl);
+          encode(expiration, bl);
+          encode(addr, bl, features);
+          encode(description, bl);
           ENCODE_FINISH(bl);
         }
-        void decode(bufferlist::iterator &bl) {
+        void decode(bufferlist::const_iterator &bl) {
           DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl);
-          ::decode(expiration, bl);
-          ::decode(addr, bl);
-          ::decode(description, bl);
+          decode(expiration, bl);
+          decode(addr, bl);
+          decode(description, bl);
           DECODE_FINISH(bl);
         }
         void dump(Formatter *f) const;
         static void generate_test_instances(list<locker_info_t *>& o);
       };
-      WRITE_CLASS_ENCODER_FEATURES(rados::cls::lock::locker_info_t)
+      WRITE_CLASS_ENCODER_FEATURES(locker_info_t)
 
       struct lock_info_t {
         map<locker_id_t, locker_info_t> lockers; // map of lockers
@@ -127,31 +127,28 @@ namespace rados {
 
         void encode(bufferlist &bl, uint64_t features) const {
           ENCODE_START(1, 1, bl);
-          ::encode(lockers, bl, features);
+          encode(lockers, bl, features);
           uint8_t t = (uint8_t)lock_type;
-          ::encode(t, bl);
-          ::encode(tag, bl);
+          encode(t, bl);
+          encode(tag, bl);
           ENCODE_FINISH(bl);
         }
-        void decode(bufferlist::iterator &bl) {
+        void decode(bufferlist::const_iterator &bl) {
           DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl);
-          ::decode(lockers, bl);
+          decode(lockers, bl);
           uint8_t t;
-          ::decode(t, bl);
+          decode(t, bl);
           lock_type = (ClsLockType)t;
-          ::decode(tag, bl);
+          decode(tag, bl);
           DECODE_FINISH(bl);
         }
         lock_info_t() : lock_type(LOCK_NONE) {}
         void dump(Formatter *f) const;
         static void generate_test_instances(list<lock_info_t *>& o);
       };
-      WRITE_CLASS_ENCODER_FEATURES(rados::cls::lock::lock_info_t)
+      WRITE_CLASS_ENCODER_FEATURES(lock_info_t);
     }
   }
 }
-WRITE_CLASS_ENCODER_FEATURES(rados::cls::lock::locker_info_t)
-WRITE_CLASS_ENCODER(rados::cls::lock::locker_id_t)
-WRITE_CLASS_ENCODER_FEATURES(rados::cls::lock::lock_info_t)
 
 #endif