return r;
}
+ int metadata_set(ImageCtx *ictx, const string &key, const string &value)
+ {
+ CephContext *cct = ictx->cct;
+ ldout(cct, 20) << "metadata_set " << ictx << " key=" << key << " value=" << value << dendl;
+
+ int r = ictx_check(ictx);
+ if (r < 0) {
+ return r;
+ }
+
+ return cls_client::metadata_set(&ictx->md_ctx, ictx->header_oid, key, value);
+ }
+
+ int metadata_remove(ImageCtx *ictx, const string &key)
+ {
+ CephContext *cct = ictx->cct;
+ ldout(cct, 20) << "metadata_remove " << ictx << " key=" << key << dendl;
+
+ int r = ictx_check(ictx);
+ if (r < 0) {
+ return r;
+ }
+
+ return cls_client::metadata_remove(&ictx->md_ctx, ictx->header_oid, key);
+ }
+
+ int metadata_list(ImageCtx *ictx, map<string, string> *pairs)
+ {
+ CephContext *cct = ictx->cct;
+ ldout(cct, 20) << "metadata_list " << ictx << dendl;
+
+ int r = ictx_check(ictx);
+ if (r < 0) {
+ return r;
+ }
+
+ return cls_client::metadata_list(&ictx->md_ctx, ictx->header_oid, pairs);
+ }
+
int aio_discard(ImageCtx *ictx, uint64_t off, uint64_t len, AioCompletion *c)
{
CephContext *cct = ictx->cct;
int flush(ImageCtx *ictx);
int _flush(ImageCtx *ictx);
int invalidate_cache(ImageCtx *ictx);
+ int metadata_list(ImageCtx *ictx, map<string, string> *pairs);
+ int metadata_set(ImageCtx *ictx, const std::string &key, const std::string &value);
+ int metadata_remove(ImageCtx *ictx, const std::string &key);
ssize_t handle_sparse_read(CephContext *cct,
ceph::bufferlist data_bl,