]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: c binding for rados_tmap_update()
authorSage Weil <sage@newdream.net>
Wed, 7 Apr 2010 23:43:22 +0000 (16:43 -0700)
committerSage Weil <sage@newdream.net>
Wed, 7 Apr 2010 23:43:22 +0000 (16:43 -0700)
src/librados.cc
src/osdc/librados.h

index 246455eafb12872e0adfdf0356751f3809ac3e27..e7f4cdc911ee838a9b28ea8437a4ed85cb30fd8a 100644 (file)
@@ -1619,6 +1619,15 @@ extern "C" int rados_stat(rados_pool_t pool, const char *o, __u64 *psize, time_t
   return radosp->stat(*ctx, oid, psize, pmtime);
 }
 
+extern "C" int rados_tmap_update(rados_pool_t pool, const char *o, const char *cmdbuf, size_t cmdbuflen)
+{
+  RadosClient::PoolCtx *ctx = (RadosClient::PoolCtx *)pool;
+  object_t oid(o);
+  bufferlist cmdbl;
+  cmdbl.append(cmdbuf, cmdbuflen);
+  return radosp->tmap_update(*ctx, oid, cmdbl);
+}
+
 extern "C" int rados_exec(rados_pool_t pool, const char *o, const char *cls, const char *method,
                          const char *inbuf, size_t in_len, char *buf, size_t out_len)
 {
index 3060c796c447c80a0cd0718edc1c08605c756694..4966b442d887aee7c7f9956758e2a9bb4df4ff66 100644 (file)
@@ -71,6 +71,7 @@ int rados_remove(rados_pool_t pool, const char *oid);
 int rados_getxattr(rados_pool_t pool, const char *o, const char *name, char *buf, size_t len);
 int rados_setxattr(rados_pool_t pool, const char *o, const char *name, const char *buf, size_t len);
 int rados_stat(rados_pool_t pool, const char *o, __u64 *psize, time_t *pmtime);
+int rados_tmap_update(rados_pool_t pool, const char *o, const char *cmdbuf, size_t cmdbuflen);
 int rados_exec(rados_pool_t pool, const char *oid, const char *cls, const char *method,
               const char *in_buf, size_t in_len, char *buf, size_t out_len);