1 #ifndef CEPH_CLS_RGW_TYPES_H
2 #define CEPH_CLS_RGW_TYPES_H
6 #include "include/types.h"
7 #include "common/ceph_time.h"
8 #include "common/Formatter.h"
10 #include "rgw/rgw_basic_types.h"
12 #define CEPH_RGW_REMOVE 'r'
13 #define CEPH_RGW_UPDATE 'u'
14 #define CEPH_RGW_TAG_TIMEOUT 120
15 #define CEPH_RGW_DIR_SUGGEST_LOG_OP 0x80
16 #define CEPH_RGW_DIR_SUGGEST_OP_MASK 0x7f
24 enum RGWPendingState
{
25 CLS_RGW_STATE_PENDING_MODIFY
= 0,
26 CLS_RGW_STATE_COMPLETE
= 1,
27 CLS_RGW_STATE_UNKNOWN
= 2,
33 CLS_RGW_OP_CANCEL
= 2,
34 CLS_RGW_OP_UNKNOWN
= 3,
35 CLS_RGW_OP_LINK_OLH
= 4,
36 CLS_RGW_OP_LINK_OLH_DM
= 5, /* creation of delete marker */
37 CLS_RGW_OP_UNLINK_INSTANCE
= 6,
41 RGW_BILOG_FLAG_VERSIONED_OP
= 0x1,
44 enum RGWCheckMTimeType
{
45 CLS_RGW_CHECK_TIME_MTIME_EQ
= 0,
46 CLS_RGW_CHECK_TIME_MTIME_LT
= 1,
47 CLS_RGW_CHECK_TIME_MTIME_LE
= 2,
48 CLS_RGW_CHECK_TIME_MTIME_GT
= 3,
49 CLS_RGW_CHECK_TIME_MTIME_GE
= 4,
52 #define ROUND_BLOCK_SIZE 4096
54 static inline uint64_t cls_rgw_get_rounded_size(uint64_t size
)
56 return (size
+ ROUND_BLOCK_SIZE
- 1) & ~(ROUND_BLOCK_SIZE
- 1);
59 struct rgw_bucket_pending_info
{
60 RGWPendingState state
;
61 ceph::real_time timestamp
;
64 rgw_bucket_pending_info() : state(CLS_RGW_STATE_PENDING_MODIFY
), op(0) {}
66 void encode(bufferlist
&bl
) const {
67 ENCODE_START(2, 2, bl
);
68 uint8_t s
= (uint8_t)state
;
70 ::encode(timestamp
, bl
);
74 void decode(bufferlist::iterator
&bl
) {
75 DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl
);
78 state
= (RGWPendingState
)s
;
79 ::decode(timestamp
, bl
);
83 void dump(Formatter
*f
) const;
84 void decode_json(JSONObj
*obj
);
85 static void generate_test_instances(list
<rgw_bucket_pending_info
*>& o
);
87 WRITE_CLASS_ENCODER(rgw_bucket_pending_info
)
89 struct rgw_bucket_dir_entry_meta
{
92 ceph::real_time mtime
;
95 string owner_display_name
;
97 uint64_t accounted_size
;
100 rgw_bucket_dir_entry_meta() :
101 category(0), size(0), accounted_size(0) { }
103 void encode(bufferlist
&bl
) const {
104 ENCODE_START(5, 3, bl
);
105 ::encode(category
, bl
);
110 ::encode(owner_display_name
, bl
);
111 ::encode(content_type
, bl
);
112 ::encode(accounted_size
, bl
);
113 ::encode(user_data
, bl
);
116 void decode(bufferlist::iterator
&bl
) {
117 DECODE_START_LEGACY_COMPAT_LEN(5, 3, 3, bl
);
118 ::decode(category
, bl
);
123 ::decode(owner_display_name
, bl
);
125 ::decode(content_type
, bl
);
127 ::decode(accounted_size
, bl
);
129 accounted_size
= size
;
131 ::decode(user_data
, bl
);
134 void dump(Formatter
*f
) const;
135 void decode_json(JSONObj
*obj
);
136 static void generate_test_instances(list
<rgw_bucket_dir_entry_meta
*>& o
);
138 WRITE_CLASS_ENCODER(rgw_bucket_dir_entry_meta
)
141 void encode_packed_val(T val
, bufferlist
& bl
)
143 if ((uint64_t)val
< 0x80) {
144 ::encode((uint8_t)val
, bl
);
146 unsigned char c
= 0x80;
148 if ((uint64_t)val
< 0x100) {
151 ::encode((uint8_t)val
, bl
);
152 } else if ((uint64_t)val
<= 0x10000) {
155 ::encode((uint16_t)val
, bl
);
156 } else if ((uint64_t)val
<= 0x1000000) {
159 ::encode((uint32_t)val
, bl
);
163 ::encode((uint64_t)val
, bl
);
169 void decode_packed_val(T
& val
, bufferlist::iterator
& bl
)
210 throw buffer::error();
214 struct rgw_bucket_entry_ver
{
218 rgw_bucket_entry_ver() : pool(-1), epoch(0) {}
220 void encode(bufferlist
&bl
) const {
221 ENCODE_START(1, 1, bl
);
222 ::encode_packed_val(pool
, bl
);
223 ::encode_packed_val(epoch
, bl
);
226 void decode(bufferlist::iterator
&bl
) {
228 ::decode_packed_val(pool
, bl
);
229 ::decode_packed_val(epoch
, bl
);
232 void dump(Formatter
*f
) const;
233 void decode_json(JSONObj
*obj
);
234 static void generate_test_instances(list
<rgw_bucket_entry_ver
*>& o
);
236 WRITE_CLASS_ENCODER(rgw_bucket_entry_ver
)
238 struct cls_rgw_obj_key
{
243 cls_rgw_obj_key(const string
&_name
) : name(_name
) {}
244 cls_rgw_obj_key(const string
& n
, const string
& i
) : name(n
), instance(i
) {}
246 void set(const string
& _name
) {
250 bool operator==(const cls_rgw_obj_key
& k
) const {
251 return (name
.compare(k
.name
) == 0) &&
252 (instance
.compare(k
.instance
) == 0);
254 bool operator<(const cls_rgw_obj_key
& k
) const {
255 int r
= name
.compare(k
.name
);
257 r
= instance
.compare(k
.instance
);
261 bool operator<=(const cls_rgw_obj_key
& k
) const {
267 void encode(bufferlist
&bl
) const {
268 ENCODE_START(1, 1, bl
);
270 ::encode(instance
, bl
);
273 void decode(bufferlist::iterator
&bl
) {
276 ::decode(instance
, bl
);
279 void dump(Formatter
*f
) const {
280 f
->dump_string("name", name
);
281 f
->dump_string("instance", instance
);
283 void decode_json(JSONObj
*obj
);
284 static void generate_test_instances(list
<cls_rgw_obj_key
*>& ls
) {
285 ls
.push_back(new cls_rgw_obj_key
);
286 ls
.push_back(new cls_rgw_obj_key
);
287 ls
.back()->name
= "name";
288 ls
.back()->instance
= "instance";
291 WRITE_CLASS_ENCODER(cls_rgw_obj_key
)
294 #define RGW_BUCKET_DIRENT_FLAG_VER 0x1 /* a versioned object instance */
295 #define RGW_BUCKET_DIRENT_FLAG_CURRENT 0x2 /* the last object instance of a versioned object */
296 #define RGW_BUCKET_DIRENT_FLAG_DELETE_MARKER 0x4 /* delete marker */
297 #define RGW_BUCKET_DIRENT_FLAG_VER_MARKER 0x8 /* object is versioned, a placeholder for the plain entry */
299 struct rgw_bucket_dir_entry
{
301 rgw_bucket_entry_ver ver
;
304 struct rgw_bucket_dir_entry_meta meta
;
305 multimap
<string
, struct rgw_bucket_pending_info
> pending_map
;
309 uint64_t versioned_epoch
;
311 rgw_bucket_dir_entry() :
312 exists(false), index_ver(0), flags(0), versioned_epoch(0) {}
314 void encode(bufferlist
&bl
) const {
315 ENCODE_START(8, 3, bl
);
316 ::encode(key
.name
, bl
);
317 ::encode(ver
.epoch
, bl
);
318 ::encode(exists
, bl
);
320 ::encode(pending_map
, bl
);
321 ::encode(locator
, bl
);
323 ::encode_packed_val(index_ver
, bl
);
325 ::encode(key
.instance
, bl
);
327 ::encode(versioned_epoch
, bl
);
330 void decode(bufferlist::iterator
&bl
) {
331 DECODE_START_LEGACY_COMPAT_LEN(8, 3, 3, bl
);
332 ::decode(key
.name
, bl
);
333 ::decode(ver
.epoch
, bl
);
334 ::decode(exists
, bl
);
336 ::decode(pending_map
, bl
);
338 ::decode(locator
, bl
);
346 ::decode_packed_val(index_ver
, bl
);
350 ::decode(key
.instance
, bl
);
356 ::decode(versioned_epoch
, bl
);
362 int test_flags
= RGW_BUCKET_DIRENT_FLAG_VER
| RGW_BUCKET_DIRENT_FLAG_CURRENT
;
363 return (flags
& RGW_BUCKET_DIRENT_FLAG_VER
) == 0 ||
364 (flags
& test_flags
) == test_flags
;
366 bool is_delete_marker() { return (flags
& RGW_BUCKET_DIRENT_FLAG_DELETE_MARKER
) != 0; }
368 return is_current() && !is_delete_marker();
370 bool is_valid() { return (flags
& RGW_BUCKET_DIRENT_FLAG_VER_MARKER
) == 0; }
372 void dump(Formatter
*f
) const;
373 void decode_json(JSONObj
*obj
);
374 static void generate_test_instances(list
<rgw_bucket_dir_entry
*>& o
);
376 WRITE_CLASS_ENCODER(rgw_bucket_dir_entry
)
385 struct rgw_bucket_category_stats
;
387 struct rgw_cls_bi_entry
{
392 rgw_cls_bi_entry() : type(InvalidIdx
) {}
394 void encode(bufferlist
& bl
) const {
395 ENCODE_START(1, 1, bl
);
396 ::encode((uint8_t)type
, bl
);
402 void decode(bufferlist::iterator
& bl
) {
406 type
= (BIIndexType
)c
;
412 void dump(Formatter
*f
) const;
413 void decode_json(JSONObj
*obj
, cls_rgw_obj_key
*effective_key
= NULL
);
415 bool get_info(cls_rgw_obj_key
*key
, uint8_t *category
, rgw_bucket_category_stats
*accounted_stats
);
417 WRITE_CLASS_ENCODER(rgw_cls_bi_entry
)
420 CLS_RGW_OLH_OP_UNKNOWN
= 0,
421 CLS_RGW_OLH_OP_LINK_OLH
= 1,
422 CLS_RGW_OLH_OP_UNLINK_OLH
= 2, /* object does not exist */
423 CLS_RGW_OLH_OP_REMOVE_INSTANCE
= 3,
426 struct rgw_bucket_olh_log_entry
{
433 rgw_bucket_olh_log_entry() : epoch(0), op(CLS_RGW_OLH_OP_UNKNOWN
), delete_marker(false) {}
436 void encode(bufferlist
&bl
) const {
437 ENCODE_START(1, 1, bl
);
439 ::encode((__u8
)op
, bl
);
440 ::encode(op_tag
, bl
);
442 ::encode(delete_marker
, bl
);
445 void decode(bufferlist::iterator
&bl
) {
451 ::decode(op_tag
, bl
);
453 ::decode(delete_marker
, bl
);
456 static void generate_test_instances(list
<rgw_bucket_olh_log_entry
*>& o
);
457 void dump(Formatter
*f
) const;
458 void decode_json(JSONObj
*obj
);
460 WRITE_CLASS_ENCODER(rgw_bucket_olh_log_entry
)
462 struct rgw_bucket_olh_entry
{
466 map
<uint64_t, vector
<struct rgw_bucket_olh_log_entry
> > pending_log
;
469 bool pending_removal
;
471 rgw_bucket_olh_entry() : delete_marker(false), epoch(0), exists(false), pending_removal(false) {}
473 void encode(bufferlist
&bl
) const {
474 ENCODE_START(1, 1, bl
);
476 ::encode(delete_marker
, bl
);
478 ::encode(pending_log
, bl
);
480 ::encode(exists
, bl
);
481 ::encode(pending_removal
, bl
);
484 void decode(bufferlist::iterator
&bl
) {
487 ::decode(delete_marker
, bl
);
489 ::decode(pending_log
, bl
);
491 ::decode(exists
, bl
);
492 ::decode(pending_removal
, bl
);
495 void dump(Formatter
*f
) const;
496 void decode_json(JSONObj
*obj
);
498 WRITE_CLASS_ENCODER(rgw_bucket_olh_entry
)
500 struct rgw_bi_log_entry
{
504 ceph::real_time timestamp
;
505 rgw_bucket_entry_ver ver
;
507 RGWPendingState state
;
510 uint16_t bilog_flags
;
511 string owner
; /* only being set if it's a delete marker */
512 string owner_display_name
; /* only being set if it's a delete marker */
514 rgw_bi_log_entry() : op(CLS_RGW_OP_UNKNOWN
), state(CLS_RGW_STATE_PENDING_MODIFY
), index_ver(0), bilog_flags(0) {}
516 void encode(bufferlist
&bl
) const {
517 ENCODE_START(3, 1, bl
);
519 ::encode(object
, bl
);
520 ::encode(timestamp
, bl
);
523 uint8_t c
= (uint8_t)op
;
527 encode_packed_val(index_ver
, bl
);
528 ::encode(instance
, bl
);
529 ::encode(bilog_flags
, bl
);
531 ::encode(owner_display_name
, bl
);
534 void decode(bufferlist::iterator
&bl
) {
537 ::decode(object
, bl
);
538 ::decode(timestamp
, bl
);
545 state
= (RGWPendingState
)c
;
546 decode_packed_val(index_ver
, bl
);
548 ::decode(instance
, bl
);
549 ::decode(bilog_flags
, bl
);
553 ::decode(owner_display_name
, bl
);
557 void dump(Formatter
*f
) const;
558 void decode_json(JSONObj
*obj
);
559 static void generate_test_instances(list
<rgw_bi_log_entry
*>& o
);
561 bool is_versioned() {
562 return ((bilog_flags
& RGW_BILOG_FLAG_VERSIONED_OP
) != 0);
565 WRITE_CLASS_ENCODER(rgw_bi_log_entry
)
567 struct rgw_bucket_category_stats
{
569 uint64_t total_size_rounded
;
570 uint64_t num_entries
;
571 uint64_t actual_size
{0}; //< account for compression, encryption
573 rgw_bucket_category_stats() : total_size(0), total_size_rounded(0), num_entries(0) {}
575 void encode(bufferlist
&bl
) const {
576 ENCODE_START(3, 2, bl
);
577 ::encode(total_size
, bl
);
578 ::encode(total_size_rounded
, bl
);
579 ::encode(num_entries
, bl
);
580 ::encode(actual_size
, bl
);
583 void decode(bufferlist::iterator
&bl
) {
584 DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, bl
);
585 ::decode(total_size
, bl
);
586 ::decode(total_size_rounded
, bl
);
587 ::decode(num_entries
, bl
);
589 ::decode(actual_size
, bl
);
591 actual_size
= total_size
;
595 void dump(Formatter
*f
) const;
596 static void generate_test_instances(list
<rgw_bucket_category_stats
*>& o
);
598 WRITE_CLASS_ENCODER(rgw_bucket_category_stats
)
600 struct rgw_bucket_dir_header
{
601 map
<uint8_t, rgw_bucket_category_stats
> stats
;
602 uint64_t tag_timeout
;
607 rgw_bucket_dir_header() : tag_timeout(0), ver(0), master_ver(0) {}
609 void encode(bufferlist
&bl
) const {
610 ENCODE_START(5, 2, bl
);
612 ::encode(tag_timeout
, bl
);
614 ::encode(master_ver
, bl
);
615 ::encode(max_marker
, bl
);
618 void decode(bufferlist::iterator
&bl
) {
619 DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, bl
);
622 ::decode(tag_timeout
, bl
);
628 ::decode(master_ver
, bl
);
633 ::decode(max_marker
, bl
);
637 void dump(Formatter
*f
) const;
638 static void generate_test_instances(list
<rgw_bucket_dir_header
*>& o
);
640 WRITE_CLASS_ENCODER(rgw_bucket_dir_header
)
642 struct rgw_bucket_dir
{
643 struct rgw_bucket_dir_header header
;
644 std::map
<string
, struct rgw_bucket_dir_entry
> m
;
646 void encode(bufferlist
&bl
) const {
647 ENCODE_START(2, 2, bl
);
648 ::encode(header
, bl
);
652 void decode(bufferlist::iterator
&bl
) {
653 DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl
);
654 ::decode(header
, bl
);
658 void dump(Formatter
*f
) const;
659 static void generate_test_instances(list
<rgw_bucket_dir
*>& o
);
661 WRITE_CLASS_ENCODER(rgw_bucket_dir
)
663 struct rgw_usage_data
{
665 uint64_t bytes_received
;
667 uint64_t successful_ops
;
669 rgw_usage_data() : bytes_sent(0), bytes_received(0), ops(0), successful_ops(0) {}
670 rgw_usage_data(uint64_t sent
, uint64_t received
) : bytes_sent(sent
), bytes_received(received
), ops(0), successful_ops(0) {}
672 void encode(bufferlist
& bl
) const {
673 ENCODE_START(1, 1, bl
);
674 ::encode(bytes_sent
, bl
);
675 ::encode(bytes_received
, bl
);
677 ::encode(successful_ops
, bl
);
681 void decode(bufferlist::iterator
& bl
) {
683 ::decode(bytes_sent
, bl
);
684 ::decode(bytes_received
, bl
);
686 ::decode(successful_ops
, bl
);
690 void aggregate(const rgw_usage_data
& usage
) {
691 bytes_sent
+= usage
.bytes_sent
;
692 bytes_received
+= usage
.bytes_received
;
694 successful_ops
+= usage
.successful_ops
;
697 WRITE_CLASS_ENCODER(rgw_usage_data
)
700 struct rgw_usage_log_entry
{
702 rgw_user payer
; /* if empty, same as owner */
705 rgw_usage_data total_usage
; /* this one is kept for backwards compatibility */
706 map
<string
, rgw_usage_data
> usage_map
;
708 rgw_usage_log_entry() : epoch(0) {}
709 rgw_usage_log_entry(string
& o
, string
& b
) : owner(o
), bucket(b
), epoch(0) {}
710 rgw_usage_log_entry(string
& o
, string
& p
, string
& b
) : owner(o
), payer(p
), bucket(b
), epoch(0) {}
712 void encode(bufferlist
& bl
) const {
713 ENCODE_START(3, 1, bl
);
714 ::encode(owner
.to_str(), bl
);
715 ::encode(bucket
, bl
);
717 ::encode(total_usage
.bytes_sent
, bl
);
718 ::encode(total_usage
.bytes_received
, bl
);
719 ::encode(total_usage
.ops
, bl
);
720 ::encode(total_usage
.successful_ops
, bl
);
721 ::encode(usage_map
, bl
);
722 ::encode(payer
.to_str(), bl
);
727 void decode(bufferlist::iterator
& bl
) {
732 ::decode(bucket
, bl
);
734 ::decode(total_usage
.bytes_sent
, bl
);
735 ::decode(total_usage
.bytes_received
, bl
);
736 ::decode(total_usage
.ops
, bl
);
737 ::decode(total_usage
.successful_ops
, bl
);
739 usage_map
[""] = total_usage
;
741 ::decode(usage_map
, bl
);
751 void aggregate(const rgw_usage_log_entry
& e
, map
<string
, bool> *categories
= NULL
) {
759 map
<string
, rgw_usage_data
>::const_iterator iter
;
760 for (iter
= e
.usage_map
.begin(); iter
!= e
.usage_map
.end(); ++iter
) {
761 if (!categories
|| !categories
->size() || categories
->count(iter
->first
)) {
762 add(iter
->first
, iter
->second
);
767 void sum(rgw_usage_data
& usage
, map
<string
, bool>& categories
) const {
768 usage
= rgw_usage_data();
769 for (map
<string
, rgw_usage_data
>::const_iterator iter
= usage_map
.begin(); iter
!= usage_map
.end(); ++iter
) {
770 if (!categories
.size() || categories
.count(iter
->first
)) {
771 usage
.aggregate(iter
->second
);
776 void add(const string
& category
, const rgw_usage_data
& data
) {
777 usage_map
[category
].aggregate(data
);
778 total_usage
.aggregate(data
);
781 WRITE_CLASS_ENCODER(rgw_usage_log_entry
)
783 struct rgw_usage_log_info
{
784 vector
<rgw_usage_log_entry
> entries
;
786 void encode(bufferlist
& bl
) const {
787 ENCODE_START(1, 1, bl
);
788 ::encode(entries
, bl
);
792 void decode(bufferlist::iterator
& bl
) {
794 ::decode(entries
, bl
);
798 rgw_usage_log_info() {}
800 WRITE_CLASS_ENCODER(rgw_usage_log_info
)
802 struct rgw_user_bucket
{
807 rgw_user_bucket(const string
& u
, const string
& b
) : user(u
), bucket(b
) {}
809 void encode(bufferlist
& bl
) const {
810 ENCODE_START(1, 1, bl
);
812 ::encode(bucket
, bl
);
816 void decode(bufferlist::iterator
& bl
) {
819 ::decode(bucket
, bl
);
823 bool operator<(const rgw_user_bucket
& ub2
) const {
824 int comp
= user
.compare(ub2
.user
);
828 return bucket
.compare(ub2
.bucket
) < 0;
833 WRITE_CLASS_ENCODER(rgw_user_bucket
)
837 CLS_RGW_GC_DEL_BUCKET
,
846 cls_rgw_obj(string
& _p
, cls_rgw_obj_key
& _k
) : pool(_p
), key(_k
) {}
848 void encode(bufferlist
& bl
) const {
849 ENCODE_START(2, 1, bl
);
851 ::encode(key
.name
, bl
);
857 void decode(bufferlist::iterator
& bl
) {
860 ::decode(key
.name
, bl
);
868 void dump(Formatter
*f
) const {
869 f
->dump_string("pool", pool
);
870 f
->dump_string("oid", key
.name
);
871 f
->dump_string("key", loc
);
872 f
->dump_string("instance", key
.instance
);
874 static void generate_test_instances(list
<cls_rgw_obj
*>& ls
) {
875 ls
.push_back(new cls_rgw_obj
);
876 ls
.push_back(new cls_rgw_obj
);
877 ls
.back()->pool
= "mypool";
878 ls
.back()->key
.name
= "myoid";
879 ls
.back()->loc
= "mykey";
882 WRITE_CLASS_ENCODER(cls_rgw_obj
)
884 struct cls_rgw_obj_chain
{
885 list
<cls_rgw_obj
> objs
;
887 cls_rgw_obj_chain() {}
889 void push_obj(const string
& pool
, const cls_rgw_obj_key
& key
, const string
& loc
) {
897 void encode(bufferlist
& bl
) const {
898 ENCODE_START(1, 1, bl
);
903 void decode(bufferlist::iterator
& bl
) {
909 void dump(Formatter
*f
) const {
910 f
->open_array_section("objs");
911 for (list
<cls_rgw_obj
>::const_iterator p
= objs
.begin(); p
!= objs
.end(); ++p
) {
912 f
->open_object_section("obj");
918 static void generate_test_instances(list
<cls_rgw_obj_chain
*>& ls
) {
919 ls
.push_back(new cls_rgw_obj_chain
);
926 WRITE_CLASS_ENCODER(cls_rgw_obj_chain
)
928 struct cls_rgw_gc_obj_info
931 cls_rgw_obj_chain chain
;
932 ceph::real_time time
;
934 cls_rgw_gc_obj_info() {}
936 void encode(bufferlist
& bl
) const {
937 ENCODE_START(1, 1, bl
);
944 void decode(bufferlist::iterator
& bl
) {
952 void dump(Formatter
*f
) const {
953 f
->dump_string("tag", tag
);
954 f
->open_object_section("chain");
957 f
->dump_stream("time") << time
;
959 static void generate_test_instances(list
<cls_rgw_gc_obj_info
*>& ls
) {
960 ls
.push_back(new cls_rgw_gc_obj_info
);
961 ls
.push_back(new cls_rgw_gc_obj_info
);
962 ls
.back()->tag
= "footag";
963 ceph_timespec ts
{21, 32};
964 ls
.back()->time
= ceph::real_clock::from_ceph_timespec(ts
);
967 WRITE_CLASS_ENCODER(cls_rgw_gc_obj_info
)
969 struct cls_rgw_lc_obj_head
974 cls_rgw_lc_obj_head() {}
976 void encode(bufferlist
& bl
) const {
977 ENCODE_START(1, 1, bl
);
978 uint64_t t
= start_date
;
980 ::encode(marker
, bl
);
984 void decode(bufferlist::iterator
& bl
) {
988 start_date
= static_cast<time_t>(t
);
989 ::decode(marker
, bl
);
994 WRITE_CLASS_ENCODER(cls_rgw_lc_obj_head
)