Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / include / krbd.h
1 /*
2  * Ceph - scalable distributed file system
3  *
4  * Copyright (C) 2014 Inktank Storage, Inc.
5  *
6  * This is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License version 2.1, as published by the Free Software
9  * Foundation.  See file COPYING.
10  *
11  */
12
13 #ifndef CEPH_KRBD_H
14 #define CEPH_KRBD_H
15
16 #include "rados/librados.h"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 struct krbd_ctx;
23
24 int krbd_create_from_context(rados_config_t cct, struct krbd_ctx **pctx);
25 void krbd_destroy(struct krbd_ctx *ctx);
26
27 int krbd_map(struct krbd_ctx *ctx, const char *pool, const char *image,
28              const char *snap, const char *options, char **pdevnode);
29
30 int krbd_unmap(struct krbd_ctx *ctx, const char *devnode,
31                const char *options);
32 int krbd_unmap_by_spec(struct krbd_ctx *ctx, const char *pool,
33                        const char *image, const char *snap,
34                        const char *options);
35
36 #ifdef __cplusplus
37 }
38 #endif
39
40 #ifdef __cplusplus
41
42 namespace ceph {
43   class Formatter;
44 }
45
46 int krbd_showmapped(struct krbd_ctx *ctx, ceph::Formatter *f);
47
48 #endif /* __cplusplus */
49
50 #endif /* CEPH_KRBD_H */