* interpreted as plaintext.
*/
CEPH_RBD_API int rbd_encryption_load2(rbd_image_t image,
- rbd_encryption_spec_t *specs,
+ const rbd_encryption_spec_t *specs,
size_t spec_count);
/* snapshots */
size_t opts_size);
int encryption_load(encryption_format_t format, encryption_options_t opts,
size_t opts_size);
- int encryption_load2(encryption_spec_t *specs, size_t spec_count);
+ int encryption_load2(const encryption_spec_t *specs, size_t spec_count);
/* striping */
uint64_t get_stripe_unit() const;
}
template <typename I>
-int Image<I>::encryption_load(I* ictx, encryption_spec_t *specs,
+int Image<I>::encryption_load(I* ictx, const encryption_spec_t *specs,
size_t spec_count, bool c_api) {
std::vector<std::unique_ptr<crypto::EncryptionFormat<I>>> formats;
static int encryption_format(ImageCtxT *ictx, encryption_format_t format,
encryption_options_t opts, size_t opts_size,
bool c_api);
- static int encryption_load(ImageCtxT *ictx, encryption_spec_t *specs,
+ static int encryption_load(ImageCtxT *ictx, const encryption_spec_t *specs,
size_t spec_count, bool c_api);
-
};
} // namespace api
return librbd::api::Image<>::encryption_load(ictx, &spec, 1, false);
}
- int Image::encryption_load2(encryption_spec_t *specs, size_t spec_count)
+ int Image::encryption_load2(const encryption_spec_t *specs, size_t spec_count)
{
ImageCtx *ictx = (ImageCtx *)ctx;
return librbd::api::Image<>::encryption_load(
}
extern "C" int rbd_encryption_load2(rbd_image_t image,
- rbd_encryption_spec_t *specs,
+ const rbd_encryption_spec_t *specs,
size_t spec_count)
{
librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
rbd_encryption_format_t format,
rbd_encryption_options_t opts, size_t opts_size)
int rbd_encryption_load2(rbd_image_t image,
- rbd_encryption_spec_t *specs,
+ const rbd_encryption_spec_t *specs,
size_t spec_count)
rbd_encryption_options_t opts, size_t opts_size):
pass
int rbd_encryption_load2(rbd_image_t image,
- rbd_encryption_spec_t *specs,
+ const rbd_encryption_spec_t *specs,
size_t spec_count):
pass