]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 | ||
11fdf7f2 TL |
27 | int krbd_map(struct krbd_ctx *ctx, |
28 | const char *pool_name, | |
29 | const char *nspace_name, | |
30 | const char *image_name, | |
31 | const char *snap_name, | |
32 | const char *options, | |
33 | char **pdevnode); | |
34 | int krbd_is_mapped(struct krbd_ctx *ctx, | |
35 | const char *pool_name, | |
36 | const char *nspace_name, | |
37 | const char *image_name, | |
38 | const char *snap_name, | |
39 | char **pdevnode); | |
7c673cae FG |
40 | |
41 | int krbd_unmap(struct krbd_ctx *ctx, const char *devnode, | |
42 | const char *options); | |
11fdf7f2 TL |
43 | int krbd_unmap_by_spec(struct krbd_ctx *ctx, |
44 | const char *pool_name, | |
45 | const char *nspace_name, | |
46 | const char *image_name, | |
47 | const char *snap_name, | |
7c673cae FG |
48 | const char *options); |
49 | ||
50 | #ifdef __cplusplus | |
51 | } | |
52 | #endif | |
53 | ||
54 | #ifdef __cplusplus | |
55 | ||
56 | namespace ceph { | |
57 | class Formatter; | |
58 | } | |
59 | ||
60 | int krbd_showmapped(struct krbd_ctx *ctx, ceph::Formatter *f); | |
61 | ||
62 | #endif /* __cplusplus */ | |
63 | ||
64 | #endif /* CEPH_KRBD_H */ |