]> git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/api/Pool.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / librbd / api / Pool.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_API_POOL_H
5 #define CEPH_LIBRBD_API_POOL_H
6
7 #include "include/int_types.h"
8 #include "include/rados/librados_fwd.hpp"
9 #include "include/rbd/librbd.h"
10 #include <map>
11
12 namespace librbd {
13
14 struct ImageCtx;
15
16 namespace api {
17
18 template <typename ImageCtxT = librbd::ImageCtx>
19 class Pool {
20 public:
21 typedef std::map<rbd_pool_stat_option_t, uint64_t*> StatOptions;
22
23 static int init(librados::IoCtx& io_ctx, bool force);
24
25 static int add_stat_option(StatOptions* stat_options,
26 rbd_pool_stat_option_t option,
27 uint64_t* value);
28
29 static int get_stats(librados::IoCtx& io_ctx, StatOptions* stat_options);
30
31 };
32
33 } // namespace api
34 } // namespace librbd
35
36 extern template class librbd::api::Pool<librbd::ImageCtx>;
37
38 #endif // CEPH_LIBRBD_API_POOL_H