};
struct Flush {
+ FlushSource flush_source;
+
+ Flush(FlushSource flush_source) : flush_source(flush_source) {
+ }
};
static ImageDispatchSpec* create_read_request(
ReadResult &&read_result, int op_flags,
const ZTracer::Trace &parent_trace) {
return new ImageDispatchSpec(image_ctx, aio_comp,
- std::move(image_extents),
- Read{std::move(read_result)},
- op_flags, parent_trace);
+ std::move(image_extents),
+ Read{std::move(read_result)},
+ op_flags, parent_trace);
}
static ImageDispatchSpec* create_discard_request(
ImageCtxT &image_ctx, AioCompletion *aio_comp, uint64_t off, uint64_t len,
bool skip_partial_discard, const ZTracer::Trace &parent_trace) {
return new ImageDispatchSpec(image_ctx, aio_comp, {{off, len}},
- Discard{skip_partial_discard}, 0,
- parent_trace);
+ Discard{skip_partial_discard}, 0,
+ parent_trace);
}
static ImageDispatchSpec* create_write_request(
ImageCtxT &image_ctx, AioCompletion *aio_comp, Extents &&image_extents,
bufferlist &&bl, int op_flags, const ZTracer::Trace &parent_trace) {
return new ImageDispatchSpec(image_ctx, aio_comp, std::move(image_extents),
- Write{std::move(bl)}, op_flags, parent_trace);
+ Write{std::move(bl)}, op_flags, parent_trace);
}
static ImageDispatchSpec* create_write_same_request(
ImageCtxT &image_ctx, AioCompletion *aio_comp, uint64_t off, uint64_t len,
bufferlist &&bl, int op_flags, const ZTracer::Trace &parent_trace) {
return new ImageDispatchSpec(image_ctx, aio_comp, {{off, len}},
- WriteSame{std::move(bl)}, op_flags,
- parent_trace);
+ WriteSame{std::move(bl)}, op_flags,
+ parent_trace);
}
static ImageDispatchSpec* create_compare_and_write_request(
bufferlist &&cmp_bl, bufferlist &&bl, uint64_t *mismatch_offset,
int op_flags, const ZTracer::Trace &parent_trace) {
return new ImageDispatchSpec(image_ctx, aio_comp,
- std::move(image_extents),
- CompareAndWrite{std::move(cmp_bl),
- std::move(bl),
- mismatch_offset},
- op_flags, parent_trace);
+ std::move(image_extents),
+ CompareAndWrite{std::move(cmp_bl),
+ std::move(bl),
+ mismatch_offset},
+ op_flags, parent_trace);
}
static ImageDispatchSpec* create_flush_request(
ImageCtxT &image_ctx, AioCompletion *aio_comp,
- const ZTracer::Trace &parent_trace) {
- return new ImageDispatchSpec(image_ctx, aio_comp, {}, Flush{}, 0,
- parent_trace);
+ FlushSource flush_source, const ZTracer::Trace &parent_trace) {
+ return new ImageDispatchSpec(image_ctx, aio_comp, {}, Flush{flush_source},
+ 0, parent_trace);
}
void send();