]> git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/io/Utils.h
Import ceph 15.2.8
[ceph.git] / ceph / src / librbd / io / Utils.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_LIBRBD_IO_UTILS_H
5 #define CEPH_LIBRBD_IO_UTILS_H
6
7 #include "include/int_types.h"
8 #include "include/buffer_fwd.h"
9 #include "include/rados/rados_types.hpp"
10 #include "common/zipkin_trace.h"
11 #include "librbd/io/Types.h"
12 #include <map>
13
14 class Context;
15 class ObjectExtent;
16
17 namespace librbd {
18
19 struct ImageCtx;
20
21 namespace io {
22 namespace util {
23
24 bool assemble_write_same_extent(const LightweightObjectExtent &object_extent,
25 const ceph::bufferlist& data,
26 ceph::bufferlist *ws_data,
27 bool force_write);
28
29 template <typename ImageCtxT = librbd::ImageCtx>
30 void read_parent(ImageCtxT *image_ctx, uint64_t object_no, uint64_t off,
31 uint64_t len, librados::snap_t snap_id,
32 const ZTracer::Trace &trace, ceph::bufferlist* data,
33 Context* on_finish);
34
35 } // namespace util
36 } // namespace io
37 } // namespace librbd
38
39 #endif // CEPH_LIBRBD_IO_UTILS_H