summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2022-09-11 10:10:25 +0200
committerIlya Dryomov <idryomov@gmail.com>2022-12-04 18:19:19 +0100
commitc67e2541392dea1c4f283fb0196b386a2477b406 (patch)
tree19b44b79d35eb74db60876c62e4389890fbb6ea4
parentMerge pull request #49217 from zdover23/wip-doc-2022-12-04-rados-ops-health-c... (diff)
downloadceph-c67e2541392dea1c4f283fb0196b386a2477b406.tar.xz
ceph-c67e2541392dea1c4f283fb0196b386a2477b406.zip
librbd: CopyupRequest can move image_extents instead of copying
image_extents is already taken by rvalue reference. CopyupRequest::create() callers are prepared for the move. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r--src/librbd/io/CopyupRequest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librbd/io/CopyupRequest.cc b/src/librbd/io/CopyupRequest.cc
index d70851409fd..c614dd5c213 100644
--- a/src/librbd/io/CopyupRequest.cc
+++ b/src/librbd/io/CopyupRequest.cc
@@ -118,7 +118,8 @@ template <typename I>
CopyupRequest<I>::CopyupRequest(I *ictx, uint64_t objectno,
Extents &&image_extents,
const ZTracer::Trace &parent_trace)
- : m_image_ctx(ictx), m_object_no(objectno), m_image_extents(image_extents),
+ : m_image_ctx(ictx), m_object_no(objectno),
+ m_image_extents(std::move(image_extents)),
m_trace(librbd::util::create_trace(*m_image_ctx, "copy-up", parent_trace))
{
ceph_assert(m_image_ctx->data_ctx.is_valid());