X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fkey_value_store%2Fcls_kvs.cc;h=183c8d6f9468b024198bd9ba431564c0dd5425e1;hb=c07f9fc5a4f48397831383549fb0482b93480643;hp=2a6f3ab67bdd152bc68baedcb68e0046331ec7ad;hpb=9439ae556f035e65c9c107ae13ddd09457dbbecd;p=ceph.git diff --git a/ceph/src/key_value_store/cls_kvs.cc b/ceph/src/key_value_store/cls_kvs.cc index 2a6f3ab67..183c8d6f9 100644 --- a/ceph/src/key_value_store/cls_kvs.cc +++ b/ceph/src/key_value_store/cls_kvs.cc @@ -30,7 +30,9 @@ static int get_idata_from_key(cls_method_context_t hctx, const string &key, int r = 0; std::map kvmap; - r = cls_cxx_map_get_vals(hctx, key_data(key).encoded(), "", 2, &kvmap); + bool more; + + r = cls_cxx_map_get_vals(hctx, key_data(key).encoded(), "", 2, &kvmap, &more); if (r < 0) { CLS_LOG(20, "error reading index for range %s: %d", key.c_str(), r); return r; @@ -99,7 +101,8 @@ static int get_next_idata(cls_method_context_t hctx, const index_data &idata, index_data &out_data) { int r = 0; std::map kvs; - r = cls_cxx_map_get_vals(hctx, idata.kdata.encoded(), "", 1, &kvs); + bool more; + r = cls_cxx_map_get_vals(hctx, idata.kdata.encoded(), "", 1, &kvs, &more); if (r < 0){ CLS_LOG(20, "getting kvs failed with error %d", r); return r; @@ -150,7 +153,8 @@ static int get_prev_idata(cls_method_context_t hctx, const index_data &idata, index_data &out_data) { int r = 0; std::map kvs; - r = cls_cxx_map_get_vals(hctx, "", "", LONG_MAX, &kvs); + bool more; + r = cls_cxx_map_get_vals(hctx, "", "", LONG_MAX, &kvs, &more); if (r < 0){ CLS_LOG(20, "getting kvs failed with error %d", r); return r; @@ -202,10 +206,11 @@ static int get_prev_idata_op(cls_method_context_t hctx, static int read_many(cls_method_context_t hctx, const set &keys, map * out) { int r = 0; + bool more; CLS_ERR("reading from a map of size %d, first key encoded is %s", (int)keys.size(), key_data(*keys.begin()).encoded().c_str()); r = cls_cxx_map_get_vals(hctx, key_data(*keys.begin()).encoded().c_str(), - "", LONG_MAX, out); + "", LONG_MAX, out, &more); if (r < 0) { CLS_ERR("getting omap vals failed with error %d", r); } @@ -599,7 +604,8 @@ static int maybe_read_for_balance(cls_method_context_t hctx, } //if the assert succeeded, it needs to be balanced - r = cls_cxx_map_get_vals(hctx, "", "", LONG_MAX, &odata.omap); + bool more; + r = cls_cxx_map_get_vals(hctx, "", "", LONG_MAX, &odata.omap, &more); if (r < 0){ CLS_LOG(20, "rebalance read: getting kvs failed with error %d", r); return r;