namespace io {
class AioCompletion;
class AsyncOperation;
+ template <typename> class CopyupRequest;
template <typename> class ImageRequestWQ;
- class CopyupRequest;
}
namespace journal { struct Policy; }
std::string id; // only used for new-format images
ParentInfo parent_md;
ImageCtx *parent;
+ ImageCtx *child = nullptr;
cls::rbd::GroupSpec group_spec;
uint64_t stripe_unit, stripe_count;
uint64_t flags;
Readahead readahead;
uint64_t total_bytes_read;
- std::map<uint64_t, io::CopyupRequest*> copyup_list;
+ std::map<uint64_t, io::CopyupRequest<ImageCtx>*> copyup_list;
xlist<io::AsyncOperation*> async_ops;
xlist<AsyncRequest<>*> async_requests;
bool localize_snap_reads;
bool balance_parent_reads;
bool localize_parent_reads;
+ uint64_t sparse_read_threshold_bytes;
uint32_t readahead_trigger_requests;
uint64_t readahead_max_bytes;
uint64_t readahead_disable_after_bytes;
void cancel_async_requests();
void cancel_async_requests(Context *on_finish);
- void apply_metadata(const std::map<std::string, bufferlist> &meta);
+ void apply_metadata(const std::map<std::string, bufferlist> &meta,
+ bool thread_safe);
ExclusiveLock<ImageCtx> *create_exclusive_lock();
ObjectMap<ImageCtx> *create_object_map(uint64_t snap_id);