diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-09 17:31:51 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-09 17:31:51 -0500 |
| commit | dc5db21865507d0d9f706bd97c4a85315d60d0c5 (patch) | |
| tree | 2a8f40c4fbc6069302e8d176d3bccba875453c11 /drivers | |
| parent | d757a3b01e72368176c5ee580ea17f8c2d185cd7 (diff) | |
| parent | 34ffec60b27aa81d04e274e71e4c6ef740f75fc7 (diff) | |
Merge tag 'for-linus-20181109' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
- Two fixes for an ubd regression, one for missing locking, and one for
a missing initialization of a field. The latter was an old latent
bug, but it's now visible and triggers (Me, Anton Ivanov)
- Set of NVMe fixes via Christoph, but applied manually due to a git
tree mixup (Christoph, Sagi)
- Fix for a discard split regression, in three patches (Ming)
- Update libata git trees (Geert)
- SPDX identifier for sata_rcar (Kuninori Morimoto)
- Virtual boundary merge fix (Johannes)
- Preemptively clear memory we are going to pass to userspace, in case
the driver does a short read (Keith)
* tag 'for-linus-20181109' of git://git.kernel.dk/linux-block:
block: make sure writesame bio is aligned with logical block size
block: cleanup __blkdev_issue_discard()
block: make sure discard bio is aligned with logical block size
Revert "nvmet-rdma: use a private workqueue for delete"
nvme: make sure ns head inherits underlying device limits
nvmet: don't try to add ns to p2p map unless it actually uses it
sata_rcar: convert to SPDX identifiers
ubd: fix missing initialization of io_req
block: Clear kernel memory before copying to user
MAINTAINERS: Fix remaining pointers to obsolete libata.git
ubd: fix missing lock around request issue
block: respect virtual boundary mask in bvecs
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ata/sata_rcar.c | 6 | ||||
| -rw-r--r-- | drivers/nvme/host/core.c | 4 | ||||
| -rw-r--r-- | drivers/nvme/host/multipath.c | 1 | ||||
| -rw-r--r-- | drivers/nvme/target/core.c | 2 | ||||
| -rw-r--r-- | drivers/nvme/target/rdma.c | 19 |
5 files changed, 10 insertions, 22 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 10ecb232245d..4b1ff5bc256a 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c | |||
| @@ -1,14 +1,10 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0+ | ||
| 1 | /* | 2 | /* |
| 2 | * Renesas R-Car SATA driver | 3 | * Renesas R-Car SATA driver |
| 3 | * | 4 | * |
| 4 | * Author: Vladimir Barinov <source@cogentembedded.com> | 5 | * Author: Vladimir Barinov <source@cogentembedded.com> |
| 5 | * Copyright (C) 2013-2015 Cogent Embedded, Inc. | 6 | * Copyright (C) 2013-2015 Cogent Embedded, Inc. |
| 6 | * Copyright (C) 2013-2015 Renesas Solutions Corp. | 7 | * Copyright (C) 2013-2015 Renesas Solutions Corp. |
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License as published by the | ||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 11 | * option) any later version. | ||
| 12 | */ | 8 | */ |
| 13 | 9 | ||
| 14 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 2e65be8b1387..559d567693b8 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c | |||
| @@ -1519,8 +1519,10 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) | |||
| 1519 | if (ns->ndev) | 1519 | if (ns->ndev) |
| 1520 | nvme_nvm_update_nvm_info(ns); | 1520 | nvme_nvm_update_nvm_info(ns); |
| 1521 | #ifdef CONFIG_NVME_MULTIPATH | 1521 | #ifdef CONFIG_NVME_MULTIPATH |
| 1522 | if (ns->head->disk) | 1522 | if (ns->head->disk) { |
| 1523 | nvme_update_disk_info(ns->head->disk, ns, id); | 1523 | nvme_update_disk_info(ns->head->disk, ns, id); |
| 1524 | blk_queue_stack_limits(ns->head->disk->queue, ns->queue); | ||
| 1525 | } | ||
| 1524 | #endif | 1526 | #endif |
| 1525 | } | 1527 | } |
| 1526 | 1528 | ||
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 5e3cc8c59a39..9901afd804ce 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c | |||
| @@ -285,6 +285,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head) | |||
| 285 | blk_queue_flag_set(QUEUE_FLAG_NONROT, q); | 285 | blk_queue_flag_set(QUEUE_FLAG_NONROT, q); |
| 286 | /* set to a default value for 512 until disk is validated */ | 286 | /* set to a default value for 512 until disk is validated */ |
| 287 | blk_queue_logical_block_size(q, 512); | 287 | blk_queue_logical_block_size(q, 512); |
| 288 | blk_set_stacking_limits(&q->limits); | ||
| 288 | 289 | ||
| 289 | /* we need to propagate up the VMC settings */ | 290 | /* we need to propagate up the VMC settings */ |
| 290 | if (ctrl->vwc & NVME_CTRL_VWC_PRESENT) | 291 | if (ctrl->vwc & NVME_CTRL_VWC_PRESENT) |
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index f4efe289dc7b..a5f9bbce863f 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c | |||
| @@ -420,7 +420,7 @@ static void nvmet_p2pmem_ns_add_p2p(struct nvmet_ctrl *ctrl, | |||
| 420 | struct pci_dev *p2p_dev; | 420 | struct pci_dev *p2p_dev; |
| 421 | int ret; | 421 | int ret; |
| 422 | 422 | ||
| 423 | if (!ctrl->p2p_client) | 423 | if (!ctrl->p2p_client || !ns->use_p2pmem) |
| 424 | return; | 424 | return; |
| 425 | 425 | ||
| 426 | if (ns->p2p_dev) { | 426 | if (ns->p2p_dev) { |
diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c index ddce100be57a..3f7971d3706d 100644 --- a/drivers/nvme/target/rdma.c +++ b/drivers/nvme/target/rdma.c | |||
| @@ -122,7 +122,6 @@ struct nvmet_rdma_device { | |||
| 122 | int inline_page_count; | 122 | int inline_page_count; |
| 123 | }; | 123 | }; |
| 124 | 124 | ||
| 125 | static struct workqueue_struct *nvmet_rdma_delete_wq; | ||
| 126 | static bool nvmet_rdma_use_srq; | 125 | static bool nvmet_rdma_use_srq; |
| 127 | module_param_named(use_srq, nvmet_rdma_use_srq, bool, 0444); | 126 | module_param_named(use_srq, nvmet_rdma_use_srq, bool, 0444); |
| 128 | MODULE_PARM_DESC(use_srq, "Use shared receive queue."); | 127 | MODULE_PARM_DESC(use_srq, "Use shared receive queue."); |
| @@ -1274,12 +1273,12 @@ static int nvmet_rdma_queue_connect(struct rdma_cm_id *cm_id, | |||
| 1274 | 1273 | ||
| 1275 | if (queue->host_qid == 0) { | 1274 | if (queue->host_qid == 0) { |
| 1276 | /* Let inflight controller teardown complete */ | 1275 | /* Let inflight controller teardown complete */ |
| 1277 | flush_workqueue(nvmet_rdma_delete_wq); | 1276 | flush_scheduled_work(); |
| 1278 | } | 1277 | } |
| 1279 | 1278 | ||
| 1280 | ret = nvmet_rdma_cm_accept(cm_id, queue, &event->param.conn); | 1279 | ret = nvmet_rdma_cm_accept(cm_id, queue, &event->param.conn); |
| 1281 | if (ret) { | 1280 | if (ret) { |
| 1282 | queue_work(nvmet_rdma_delete_wq, &queue->release_work); | 1281 | schedule_work(&queue->release_work); |
| 1283 | /* Destroying rdma_cm id is not needed here */ | 1282 | /* Destroying rdma_cm id is not needed here */ |
| 1284 | return 0; | 1283 | return 0; |
| 1285 | } | 1284 | } |
| @@ -1344,7 +1343,7 @@ static void __nvmet_rdma_queue_disconnect(struct nvmet_rdma_queue *queue) | |||
| 1344 | 1343 | ||
| 1345 | if (disconnect) { | 1344 | if (disconnect) { |
| 1346 | rdma_disconnect(queue->cm_id); | 1345 | rdma_disconnect(queue->cm_id); |
| 1347 | queue_work(nvmet_rdma_delete_wq, &queue->release_work); | 1346 | schedule_work(&queue->release_work); |
| 1348 | } | 1347 | } |
| 1349 | } | 1348 | } |
| 1350 | 1349 | ||
| @@ -1374,7 +1373,7 @@ static void nvmet_rdma_queue_connect_fail(struct rdma_cm_id *cm_id, | |||
| 1374 | mutex_unlock(&nvmet_rdma_queue_mutex); | 1373 | mutex_unlock(&nvmet_rdma_queue_mutex); |
| 1375 | 1374 | ||
| 1376 | pr_err("failed to connect queue %d\n", queue->idx); | 1375 | pr_err("failed to connect queue %d\n", queue->idx); |
| 1377 | queue_work(nvmet_rdma_delete_wq, &queue->release_work); | 1376 | schedule_work(&queue->release_work); |
| 1378 | } | 1377 | } |
| 1379 | 1378 | ||
| 1380 | /** | 1379 | /** |
| @@ -1656,17 +1655,8 @@ static int __init nvmet_rdma_init(void) | |||
| 1656 | if (ret) | 1655 | if (ret) |
| 1657 | goto err_ib_client; | 1656 | goto err_ib_client; |
| 1658 | 1657 | ||
| 1659 | nvmet_rdma_delete_wq = alloc_workqueue("nvmet-rdma-delete-wq", | ||
| 1660 | WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS, 0); | ||
| 1661 | if (!nvmet_rdma_delete_wq) { | ||
| 1662 | ret = -ENOMEM; | ||
| 1663 | goto err_unreg_transport; | ||
| 1664 | } | ||
| 1665 | |||
| 1666 | return 0; | 1658 | return 0; |
| 1667 | 1659 | ||
| 1668 | err_unreg_transport: | ||
| 1669 | nvmet_unregister_transport(&nvmet_rdma_ops); | ||
| 1670 | err_ib_client: | 1660 | err_ib_client: |
| 1671 | ib_unregister_client(&nvmet_rdma_ib_client); | 1661 | ib_unregister_client(&nvmet_rdma_ib_client); |
| 1672 | return ret; | 1662 | return ret; |
| @@ -1674,7 +1664,6 @@ err_ib_client: | |||
| 1674 | 1664 | ||
| 1675 | static void __exit nvmet_rdma_exit(void) | 1665 | static void __exit nvmet_rdma_exit(void) |
| 1676 | { | 1666 | { |
| 1677 | destroy_workqueue(nvmet_rdma_delete_wq); | ||
| 1678 | nvmet_unregister_transport(&nvmet_rdma_ops); | 1667 | nvmet_unregister_transport(&nvmet_rdma_ops); |
| 1679 | ib_unregister_client(&nvmet_rdma_ib_client); | 1668 | ib_unregister_client(&nvmet_rdma_ib_client); |
| 1680 | WARN_ON_ONCE(!list_empty(&nvmet_rdma_queue_list)); | 1669 | WARN_ON_ONCE(!list_empty(&nvmet_rdma_queue_list)); |
