X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Finclude%2Fkrbd.h;fp=src%2Fceph%2Fsrc%2Finclude%2Fkrbd.h;h=c6f3c9d037c03c55fb5bcf540c47dce8d5158ece;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/include/krbd.h b/src/ceph/src/include/krbd.h new file mode 100644 index 0000000..c6f3c9d --- /dev/null +++ b/src/ceph/src/include/krbd.h @@ -0,0 +1,50 @@ +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2014 Inktank Storage, Inc. + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + +#ifndef CEPH_KRBD_H +#define CEPH_KRBD_H + +#include "rados/librados.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct krbd_ctx; + +int krbd_create_from_context(rados_config_t cct, struct krbd_ctx **pctx); +void krbd_destroy(struct krbd_ctx *ctx); + +int krbd_map(struct krbd_ctx *ctx, const char *pool, const char *image, + const char *snap, const char *options, char **pdevnode); + +int krbd_unmap(struct krbd_ctx *ctx, const char *devnode, + const char *options); +int krbd_unmap_by_spec(struct krbd_ctx *ctx, const char *pool, + const char *image, const char *snap, + const char *options); + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus + +namespace ceph { + class Formatter; +} + +int krbd_showmapped(struct krbd_ctx *ctx, ceph::Formatter *f); + +#endif /* __cplusplus */ + +#endif /* CEPH_KRBD_H */