aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-22 14:30:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-22 14:30:10 -0400
commit1204c464458e9837320a326a9fce550e3c5ef5de (patch)
treef0e19354d7d0d5553a0e0e6f7fd7c7e2f8465696 /drivers/block
parent4f2112351b4ac964b0249bdd883f7b79601f39d8 (diff)
parentf77303bddabf73ebccb60f613b77da391f933cf6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph updates from Sage Weil: "This time around we have a collection of CephFS fixes from Zheng around MDS failure handling and snapshots, support for a new CRUSH straw2 algorithm (to sync up with userspace) and several RBD cleanups and fixes from Ilya, an error path leak fix from Taesoo, and then an assorted collection of cleanups from others" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (28 commits) rbd: rbd_wq comment is obsolete libceph: announce support for straw2 buckets crush: straw2 bucket type with an efficient 64-bit crush_ln() crush: ensuring at most num-rep osds are selected crush: drop unnecessary include from mapper.c ceph: fix uninline data function ceph: rename snapshot support ceph: fix null pointer dereference in send_mds_reconnect() ceph: hold on to exclusive caps on complete directories libceph: simplify our debugfs attr macro ceph: show non-default options only libceph: expose client options through debugfs libceph, ceph: split ceph_show_options() rbd: mark block queue as non-rotational libceph: don't overwrite specific con error msgs ceph: cleanup unsafe requests when reconnecting is denied ceph: don't zero i_wrbuffer_ref when reconnecting is denied ceph: don't mark dirty caps when there is no auth cap ceph: keep i_snap_realm while there are writers libceph: osdmap.h: Add missing format newlines ...
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rbd.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index b40af3203089..812523330a78 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3762,8 +3762,8 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
3762 goto out_tag_set; 3762 goto out_tag_set;
3763 } 3763 }
3764 3764
3765 /* We use the default size, but let's be explicit about it. */ 3765 queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
3766 blk_queue_physical_block_size(q, SECTOR_SIZE); 3766 /* QUEUE_FLAG_ADD_RANDOM is off by default for blk-mq */
3767 3767
3768 /* set io sizes to object size */ 3768 /* set io sizes to object size */
3769 segment_size = rbd_obj_bytes(&rbd_dev->header); 3769 segment_size = rbd_obj_bytes(&rbd_dev->header);
@@ -5301,8 +5301,13 @@ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping)
5301 5301
5302 if (mapping) { 5302 if (mapping) {
5303 ret = rbd_dev_header_watch_sync(rbd_dev); 5303 ret = rbd_dev_header_watch_sync(rbd_dev);
5304 if (ret) 5304 if (ret) {
5305 if (ret == -ENOENT)
5306 pr_info("image %s/%s does not exist\n",
5307 rbd_dev->spec->pool_name,
5308 rbd_dev->spec->image_name);
5305 goto out_header_name; 5309 goto out_header_name;
5310 }
5306 } 5311 }
5307 5312
5308 ret = rbd_dev_header_info(rbd_dev); 5313 ret = rbd_dev_header_info(rbd_dev);
@@ -5319,8 +5324,14 @@ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping)
5319 ret = rbd_spec_fill_snap_id(rbd_dev); 5324 ret = rbd_spec_fill_snap_id(rbd_dev);
5320 else 5325 else
5321 ret = rbd_spec_fill_names(rbd_dev); 5326 ret = rbd_spec_fill_names(rbd_dev);
5322 if (ret) 5327 if (ret) {
5328 if (ret == -ENOENT)
5329 pr_info("snap %s/%s@%s does not exist\n",
5330 rbd_dev->spec->pool_name,
5331 rbd_dev->spec->image_name,
5332 rbd_dev->spec->snap_name);
5323 goto err_out_probe; 5333 goto err_out_probe;
5334 }
5324 5335
5325 if (rbd_dev->header.features & RBD_FEATURE_LAYERING) { 5336 if (rbd_dev->header.features & RBD_FEATURE_LAYERING) {
5326 ret = rbd_dev_v2_parent_info(rbd_dev); 5337 ret = rbd_dev_v2_parent_info(rbd_dev);
@@ -5390,8 +5401,11 @@ static ssize_t do_rbd_add(struct bus_type *bus,
5390 5401
5391 /* pick the pool */ 5402 /* pick the pool */
5392 rc = rbd_add_get_pool_id(rbdc, spec->pool_name); 5403 rc = rbd_add_get_pool_id(rbdc, spec->pool_name);
5393 if (rc < 0) 5404 if (rc < 0) {
5405 if (rc == -ENOENT)
5406 pr_info("pool %s does not exist\n", spec->pool_name);
5394 goto err_out_client; 5407 goto err_out_client;
5408 }
5395 spec->pool_id = (u64)rc; 5409 spec->pool_id = (u64)rc;
5396 5410
5397 /* The ceph file layout needs to fit pool id in 32 bits */ 5411 /* The ceph file layout needs to fit pool id in 32 bits */
@@ -5673,7 +5687,7 @@ static int __init rbd_init(void)
5673 5687
5674 /* 5688 /*
5675 * The number of active work items is limited by the number of 5689 * The number of active work items is limited by the number of
5676 * rbd devices, so leave @max_active at default. 5690 * rbd devices * queue depth, so leave @max_active at default.
5677 */ 5691 */
5678 rbd_wq = alloc_workqueue(RBD_DRV_NAME, WQ_MEM_RECLAIM, 0); 5692 rbd_wq = alloc_workqueue(RBD_DRV_NAME, WQ_MEM_RECLAIM, 0);
5679 if (!rbd_wq) { 5693 if (!rbd_wq) {