diff options
author | Or Ozeri <oro@il.ibm.com> | 2020-11-02 15:41:53 +0100 |
---|---|---|
committer | Or Ozeri <oro@il.ibm.com> | 2020-11-17 07:39:55 +0100 |
commit | 8d6a479332691e340dec293cb33a3f36bf8edc65 (patch) | |
tree | 9f527d5785aeab332078928f9e72d938868ef46f /src/librbd/journal | |
parent | Merge pull request #38029 from kshtsk/wip-cephadm-bootstrap-remote (diff) | |
download | ceph-8d6a479332691e340dec293cb33a3f36bf8edc65.tar.xz ceph-8d6a479332691e340dec293cb33a3f36bf8edc65.zip |
librbd: add crypto image dispatch layer
This commit adds a crypto image dispatch layer, in addition to the existing crypto object dispatch layer.
The single purpose of this layer is to translate logical image offset to "on-disk" offsets,
given a crypto header which occupies the beginning of the image data.
This calculation is done via a new remap_extents api,
which is used in to wrap existing Striper translations between object and image extents.
Signed-off-by: Or Ozeri <oro@il.ibm.com>
Diffstat (limited to 'src/librbd/journal')
-rw-r--r-- | src/librbd/journal/ObjectDispatch.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librbd/journal/ObjectDispatch.cc b/src/librbd/journal/ObjectDispatch.cc index 1c42573664f..5623c635d8f 100644 --- a/src/librbd/journal/ObjectDispatch.cc +++ b/src/librbd/journal/ObjectDispatch.cc @@ -10,6 +10,7 @@ #include "librbd/asio/ContextWQ.h" #include "librbd/io/ObjectDispatchSpec.h" #include "librbd/io/ObjectDispatcherInterface.h" +#include "librbd/io/Utils.h" #define dout_subsys ceph_subsys_rbd #undef dout_prefix @@ -51,8 +52,8 @@ struct C_CommitIOEvent : public Context { (object_dispatch_flags & io::OBJECT_DISPATCH_FLAG_WILL_RETRY_ON_ERROR) == 0) { io::Extents file_extents; - Striper::extent_to_file(image_ctx->cct, &image_ctx->layout, object_no, - object_off, object_len, file_extents); + io::util::extent_to_file(image_ctx, object_no, object_off, object_len, + file_extents); for (auto& extent : file_extents) { journal->commit_io_event_extent(journal_tid, extent.first, extent.second, r); |