]> git.proxmox.com Git - ceph.git/blob - ceph/src/cls/rgw_gc/cls_rgw_gc_ops.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / cls / rgw_gc / cls_rgw_gc_ops.h
1 #ifndef CEPH_CLS_RGW_GC_OPS_H
2 #define CEPH_CLS_RGW_GC_OPS_H
3
4 #include "cls/rgw/cls_rgw_types.h"
5
6 struct cls_rgw_gc_queue_init_op {
7 uint64_t size;
8 uint64_t num_deferred_entries{0};
9
10 cls_rgw_gc_queue_init_op() {}
11
12 void encode(bufferlist& bl) const {
13 ENCODE_START(1, 1, bl);
14 encode(size, bl);
15 encode(num_deferred_entries, bl);
16 ENCODE_FINISH(bl);
17 }
18
19 void decode(bufferlist::const_iterator& bl) {
20 DECODE_START(1, bl);
21 decode(size, bl);
22 decode(num_deferred_entries, bl);
23 DECODE_FINISH(bl);
24 }
25
26 };
27 WRITE_CLASS_ENCODER(cls_rgw_gc_queue_init_op)
28
29 struct cls_rgw_gc_queue_remove_entries_op {
30 uint64_t num_entries;
31
32 cls_rgw_gc_queue_remove_entries_op() {}
33
34 void encode(bufferlist& bl) const {
35 ENCODE_START(1, 1, bl);
36 encode(num_entries, bl);
37 ENCODE_FINISH(bl);
38 }
39
40 void decode(bufferlist::const_iterator& bl) {
41 DECODE_START(1, bl);
42 decode(num_entries, bl);
43 DECODE_FINISH(bl);
44 }
45 };
46 WRITE_CLASS_ENCODER(cls_rgw_gc_queue_remove_entries_op)
47
48 struct cls_rgw_gc_queue_defer_entry_op {
49 uint32_t expiration_secs;
50 cls_rgw_gc_obj_info info;
51 cls_rgw_gc_queue_defer_entry_op() : expiration_secs(0) {}
52
53 void encode(bufferlist& bl) const {
54 ENCODE_START(1, 1, bl);
55 encode(expiration_secs, bl);
56 encode(info, bl);
57 ENCODE_FINISH(bl);
58 }
59
60 void decode(bufferlist::const_iterator& bl) {
61 DECODE_START(1, bl);
62 decode(expiration_secs, bl);
63 decode(info, bl);
64 DECODE_FINISH(bl);
65 }
66 };
67 WRITE_CLASS_ENCODER(cls_rgw_gc_queue_defer_entry_op)
68 #endif /* CEPH_CLS_RGW_GC_OPS_H */