]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | ||
9f95a23c TL |
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 | { | |
f67539c2 | 12 | std::unordered_map<std::string, ceph::real_time> urgent_data_map; |
9f95a23c TL |
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 | ||
f67539c2 | 17 | void encode(ceph::buffer::list& bl) const { |
9f95a23c TL |
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 | ||
f67539c2 | 26 | void decode(ceph::buffer::list::const_iterator& bl) { |
9f95a23c TL |
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 | ||
f67539c2 | 37 | #endif |