summaryrefslogtreecommitdiffstats
path: root/src/librbd/io/ImageDispatchSpec.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2022-09-11 12:10:27 +0200
committerIlya Dryomov <idryomov@gmail.com>2022-12-04 18:19:19 +0100
commit37057ba2f6bb9cef233785c376892384879af871 (patch)
treec68e5833be05cb1a885247963f58d3251e6a14d7 /src/librbd/io/ImageDispatchSpec.h
parentlibrbd: CopyupRequest can move image_extents instead of copying (diff)
downloadceph-37057ba2f6bb9cef233785c376892384879af871.tar.xz
ceph-37057ba2f6bb9cef233785c376892384879af871.zip
librbd: pass image_extents to create_{discard,write_same}()
These are still taking off and len separately which is inconsistent with the rest of ImageDispatchSpec and also ImageDiscardRequest and ImageWriteSameRequest. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to '')
-rw-r--r--src/librbd/io/ImageDispatchSpec.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/librbd/io/ImageDispatchSpec.h b/src/librbd/io/ImageDispatchSpec.h
index ee95f21be63..e4018ebcdbe 100644
--- a/src/librbd/io/ImageDispatchSpec.h
+++ b/src/librbd/io/ImageDispatchSpec.h
@@ -138,11 +138,12 @@ public:
template <typename ImageCtxT = ImageCtx>
static ImageDispatchSpec* create_discard(
ImageCtxT &image_ctx, ImageDispatchLayer image_dispatch_layer,
- AioCompletion *aio_comp, uint64_t off, uint64_t len,
+ AioCompletion *aio_comp, Extents &&image_extents,
uint32_t discard_granularity_bytes, IOContext io_context,
const ZTracer::Trace &parent_trace) {
return new ImageDispatchSpec(image_ctx.io_image_dispatcher,
- image_dispatch_layer, aio_comp, {{off, len}},
+ image_dispatch_layer, aio_comp,
+ std::move(image_extents),
Discard{discard_granularity_bytes},
io_context, 0, parent_trace);
}
@@ -162,12 +163,13 @@ public:
template <typename ImageCtxT = ImageCtx>
static ImageDispatchSpec* create_write_same(
ImageCtxT &image_ctx, ImageDispatchLayer image_dispatch_layer,
- AioCompletion *aio_comp, uint64_t off, uint64_t len,
+ AioCompletion *aio_comp, Extents &&image_extents,
bufferlist &&bl, IOContext io_context, int op_flags,
const ZTracer::Trace &parent_trace) {
return new ImageDispatchSpec(image_ctx.io_image_dispatcher,
image_dispatch_layer, aio_comp,
- {{off, len}}, WriteSame{std::move(bl)},
+ std::move(image_extents),
+ WriteSame{std::move(bl)},
io_context, op_flags, parent_trace);
}