summaryrefslogtreecommitdiffstats
path: root/src/librbd/object_map/DiffRequest.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:44 +0000
commit17d6a993fc17d533460c5f40f3908c708e057c18 (patch)
tree1a3bd93e0ecd74fa02f93a528fe2f87e5314c4b5 /src/librbd/object_map/DiffRequest.h
parentReleasing progress-linux version 18.2.2-0progress7.99u1. (diff)
downloadceph-17d6a993fc17d533460c5f40f3908c708e057c18.tar.xz
ceph-17d6a993fc17d533460c5f40f3908c708e057c18.zip
Merging upstream version 18.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/librbd/object_map/DiffRequest.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/librbd/object_map/DiffRequest.h b/src/librbd/object_map/DiffRequest.h
index e83a1629e..740f4e02a 100644
--- a/src/librbd/object_map/DiffRequest.h
+++ b/src/librbd/object_map/DiffRequest.h
@@ -21,21 +21,20 @@ namespace object_map {
template <typename ImageCtxT>
class DiffRequest {
public:
- static DiffRequest* create(ImageCtxT* image_ctx, uint64_t snap_id_start,
- uint64_t snap_id_end,
+ static DiffRequest* create(ImageCtxT* image_ctx,
+ uint64_t snap_id_start, uint64_t snap_id_end,
+ uint64_t start_object_no, uint64_t end_object_no,
BitVector<2>* object_diff_state,
Context* on_finish) {
return new DiffRequest(image_ctx, snap_id_start, snap_id_end,
- object_diff_state, on_finish);
+ start_object_no, end_object_no, object_diff_state,
+ on_finish);
}
- DiffRequest(ImageCtxT* image_ctx, uint64_t snap_id_start,
- uint64_t snap_id_end, BitVector<2>* object_diff_state,
- Context* on_finish)
- : m_image_ctx(image_ctx), m_snap_id_start(snap_id_start),
- m_snap_id_end(snap_id_end), m_object_diff_state(object_diff_state),
- m_on_finish(on_finish) {
- }
+ DiffRequest(ImageCtxT* image_ctx,
+ uint64_t snap_id_start, uint64_t snap_id_end,
+ uint64_t start_object_no, uint64_t end_object_no,
+ BitVector<2>* object_diff_state, Context* on_finish);
void send();
@@ -58,6 +57,8 @@ private:
ImageCtxT* m_image_ctx;
uint64_t m_snap_id_start;
uint64_t m_snap_id_end;
+ uint64_t m_start_object_no;
+ uint64_t m_end_object_no;
BitVector<2>* m_object_diff_state;
Context* m_on_finish;
@@ -67,11 +68,13 @@ private:
uint64_t m_current_size = 0;
- BitVector<2> m_object_map;
- bool m_object_diff_state_valid = false;
-
bufferlist m_out_bl;
+ bool is_diff_iterate() const;
+
+ int prepare_for_object_map();
+ int process_object_map(const BitVector<2>& object_map);
+
void load_object_map(std::shared_lock<ceph::shared_mutex>* image_locker);
void handle_load_object_map(int r);