summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-02-14 11:24:31 +0800
committerIlya Dryomov <idryomov@gmail.com>2016-07-28 02:55:37 +0200
commit30c156d9951e0aa88202707d80c583b0a09d3167 (patch)
treeafda9d55374a9b078a5ddd8d5a8c1f2a847eccd5 /drivers/block
parent51e9273796a57c08801f45580d3db3c51987a0cb (diff)
libceph: rados pool namespace support
Add pool namesapce pointer to struct ceph_file_layout and struct ceph_object_locator. Pool namespace is used by when mapping object to PG, it's also used when composing OSD request. The namespace pointer in struct ceph_file_layout is RCU protected. So libceph can read namespace without taking lock. Signed-off-by: Yan, Zheng <zyan@redhat.com> [idryomov@gmail.com: ceph_oloc_destroy(), misc minor changes] Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index cc272ed46cfd..58fd02d4e534 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3999,6 +3999,7 @@ static struct rbd_device *rbd_dev_create(struct rbd_client *rbdc,
rbd_dev->layout.stripe_count = 1;
rbd_dev->layout.object_size = 1 << RBD_MAX_OBJ_ORDER;
rbd_dev->layout.pool_id = spec->pool_id;
+ RCU_INIT_POINTER(rbd_dev->layout.pool_ns, NULL);
/*
* If this is a mapping rbd_dev (as opposed to a parent one),