]> git.proxmox.com Git - ceph.git/blob - ceph/src/cls/rgw_gc/cls_rgw_gc_types.h
da9d08036e6b651f4c20ddcfa0653c8faba43068
[ceph.git] / ceph / src / cls / rgw_gc / cls_rgw_gc_types.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_CLS_RGW_GC_TYPES_H
5 #define CEPH_CLS_RGW_GC_TYPES_H
6
7 #include "include/types.h"
8 #include <unordered_map>
9
10 struct cls_rgw_gc_urgent_data
11 {
12 std::unordered_map<std::string, ceph::real_time> urgent_data_map;
13 uint32_t num_urgent_data_entries{0}; // requested by user
14 uint32_t num_head_urgent_entries{0}; // actual number of entries in queue head
15 uint32_t num_xattr_urgent_entries{0}; // actual number of entries in xattr in case of spill over
16
17 void encode(ceph::buffer::list& bl) const {
18 ENCODE_START(1, 1, bl);
19 encode(urgent_data_map, bl);
20 encode(num_urgent_data_entries, bl);
21 encode(num_head_urgent_entries, bl);
22 encode(num_xattr_urgent_entries, bl);
23 ENCODE_FINISH(bl);
24 }
25
26 void decode(ceph::buffer::list::const_iterator& bl) {
27 DECODE_START(1, bl);
28 decode(urgent_data_map, bl);
29 decode(num_urgent_data_entries, bl);
30 decode(num_head_urgent_entries, bl);
31 decode(num_xattr_urgent_entries, bl);
32 DECODE_FINISH(bl);
33 }
34 };
35 WRITE_CLASS_ENCODER(cls_rgw_gc_urgent_data)
36
37 #endif