]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/cls/user/cls_user_types.h
update sources to 12.2.2
[ceph.git] / ceph / src / cls / user / cls_user_types.h
index 8595f25fd1cae35bc4a9e2821ce47679809b14da..6ffd933231606e188ed420cf2d4d11ea978c99bf 100644 (file)
@@ -101,14 +101,14 @@ struct cls_user_bucket_entry {
   cls_user_bucket bucket;
   size_t size;
   size_t size_rounded;
-  real_time creation_time;
+  ceph::real_time creation_time;
   uint64_t count;
   bool user_stats_sync;
 
   cls_user_bucket_entry() : size(0), size_rounded(0), count(0), user_stats_sync(false) {}
 
   void encode(bufferlist& bl) const {
-    ENCODE_START(7, 5, bl);
+    ENCODE_START(9, 5, bl);
     uint64_t s = size;
     __u32 mt = ceph::real_clock::to_time_t(creation_time);
     string empty_str;  // originally had the bucket name here, but we encode bucket later
@@ -121,10 +121,11 @@ struct cls_user_bucket_entry {
     ::encode(s, bl);
     ::encode(user_stats_sync, bl);
     ::encode(creation_time, bl);
+    //::encode(placement_rule, bl); removed in v9
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator& bl) {
-    DECODE_START_LEGACY_COMPAT_LEN(6, 5, 5, bl);
+    DECODE_START_LEGACY_COMPAT_LEN(9, 5, 5, bl);
     __u32 mt;
     uint64_t s;
     string empty_str;  // backward compatibility
@@ -146,6 +147,10 @@ struct cls_user_bucket_entry {
       ::decode(user_stats_sync, bl);
     if (struct_v >= 7)
       ::decode(creation_time, bl);
+    if (struct_v == 8) { // added in v8, removed in v9
+      std::string placement_rule;
+      ::decode(placement_rule, bl);
+    }
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;