]> git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/journal/StandardPolicy.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / librbd / journal / StandardPolicy.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_JOURNAL_STANDARD_POLICY_H
5 #define CEPH_LIBRBD_JOURNAL_STANDARD_POLICY_H
6
7 #include "librbd/journal/Policy.h"
8
9 namespace librbd {
10
11 struct ImageCtx;
12
13 namespace journal {
14
15 template<typename ImageCtxT = ImageCtx>
16 class StandardPolicy : public Policy {
17 public:
18 StandardPolicy(ImageCtxT *image_ctx) : m_image_ctx(image_ctx) {
19 }
20
21 bool append_disabled() const override {
22 return false;
23 }
24 bool journal_disabled() const override {
25 return false;
26 }
27 void allocate_tag_on_lock(Context *on_finish) override;
28
29 private:
30 ImageCtxT *m_image_ctx;
31 };
32
33 } // namespace journal
34 } // namespace librbd
35
36 extern template class librbd::journal::StandardPolicy<librbd::ImageCtx>;
37
38 #endif // CEPH_LIBRBD_JOURNAL_STANDARD_POLICY_H