summaryrefslogtreecommitdiff
path: root/src/osdc
diff options
context:
space:
mode:
authorDavid Zafman <david.zafman@inktank.com>2013-06-10 18:18:59 -0700
committerDavid Zafman <david.zafman@inktank.com>2013-07-09 14:09:02 -0700
commite761e4e55f4b5ff32bde90a260d098add53da429 (patch)
treef1b8da33d90534b5aa8068b692e65430da98d755 /src/osdc
parent3c89a19c9288430d7f14af540ba81655d8b55e9a (diff)
downloadceph-e761e4e55f4b5ff32bde90a260d098add53da429.tar.gz
librados, os, osd, osdc, test: Add support for client specified namespaces
Add rados_ioctx_namespace_set_key() and librados::IoCtx::namespace_set_key() Add namespace to admin-daemon operations Support namespace in osd map command Add namespace to object_locator_t and hobject_t Add random namespaces to psim program Feature: #4982 (OSD: namespaces pt 1 (librados/osd, not caps)) Signed-off-by: David Zafman <david.zafman@inktank.com>
Diffstat (limited to 'src/osdc')
-rw-r--r--src/osdc/ObjectCacher.cc1
-rw-r--r--src/osdc/ObjectCacher.h1
-rw-r--r--src/osdc/Objecter.cc2
-rw-r--r--src/osdc/Objecter.h1
4 files changed, 4 insertions, 1 deletions
diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc
index 0481c6c94de..51fad699555 100644
--- a/src/osdc/ObjectCacher.cc
+++ b/src/osdc/ObjectCacher.cc
@@ -559,6 +559,7 @@ ObjectCacher::Object *ObjectCacher::get_object(sobject_t oid, ObjectSet *oset,
uint64_t truncate_size,
uint64_t truncate_seq)
{
+ // XXX: Add handling of nspace in object_locator_t in cache
assert(lock.is_locked());
// have it?
if ((uint32_t)l.pool < objects.size()) {
diff --git a/src/osdc/ObjectCacher.h b/src/osdc/ObjectCacher.h
index 4441cfa77cf..ac2833b9ea6 100644
--- a/src/osdc/ObjectCacher.h
+++ b/src/osdc/ObjectCacher.h
@@ -215,6 +215,7 @@ class ObjectCacher {
object_t get_oid() { return oid.oid; }
snapid_t get_snap() { return oid.snap; }
ObjectSet *get_object_set() { return oset; }
+ string get_namespace() { return oloc.nspace; }
object_locator_t& get_oloc() { return oloc; }
void set_object_locator(object_locator_t& l) { oloc = l; }
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index 1dfeb36e030..45b4573bbb1 100644
--- a/src/osdc/Objecter.cc
+++ b/src/osdc/Objecter.cc
@@ -1680,7 +1680,7 @@ void Objecter::list_objects(ListContext *list_context, Context *onfinish) {
C_List *onack = new C_List(list_context, onfinish, bl, this);
object_t oid;
- object_locator_t oloc(list_context->pool_id);
+ object_locator_t oloc(list_context->pool_id, list_context->nspace);
//
Op *o = new Op(oid, oloc, op.ops, CEPH_OSD_FLAG_READ, onack, NULL, NULL);
diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h
index b4086f6a413..319eb5da6ea 100644
--- a/src/osdc/Objecter.h
+++ b/src/osdc/Objecter.h
@@ -880,6 +880,7 @@ public:
int64_t pool_id;
int pool_snap_seq;
int max_entries;
+ string nspace;
std::list<pair<object_t, string> > list;
bufferlist filter;