aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-02 14:25:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-02 14:25:48 -0400
commit5f21585384a4a69b8bfdd2cae7e3648ae805f57d (patch)
treeb976d6e847b7209fb54cf78821a59951a7e9e8cd /drivers
parentfcc37f76a995cc08546b88b83f9bb5da11307a0b (diff)
parent9fe5c59ff6a1e5e26a39b75489a1420e7eaaf0b1 (diff)
Merge tag 'for-linus-20181102' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe: "The biggest part of this pull request is the revert of the blkcg cleanup series. It had one fix earlier for a stacked device issue, but another one was reported. Rather than play whack-a-mole with this, revert the entire series and try again for the next kernel release. Apart from that, only small fixes/changes. Summary: - Indentation fixup for mtip32xx (Colin Ian King) - The blkcg cleanup series revert (Dennis Zhou) - Two NVMe fixes. One fixing a regression in the nvme request initialization in this merge window, causing nvme-fc to not work. The other is a suspend/resume p2p resource issue (James, Keith) - Fix sg discard merge, allowing us to merge in cases where we didn't before (Jianchao Wang) - Call rq_qos_exit() after the queue is frozen, preventing a hang (Ming) - Fix brd queue setup, fixing an oops if we fail setting up all devices (Ming)" * tag 'for-linus-20181102' of git://git.kernel.dk/linux-block: nvme-pci: fix conflicting p2p resource adds nvme-fc: fix request private initialization blkcg: revert blkcg cleanups series block: brd: associate with queue until adding disk block: call rq_qos_exit() after queue is frozen mtip32xx: clean an indentation issue, remove extraneous tabs block: fix the DISCARD request merge
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/brd.c16
-rw-r--r--drivers/block/loop.c5
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c4
-rw-r--r--drivers/md/raid0.c2
-rw-r--r--drivers/nvme/host/fc.c2
-rw-r--r--drivers/nvme/host/pci.c5
6 files changed, 21 insertions, 13 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index df8103dd40ac..c18586fccb6f 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -396,15 +396,14 @@ static struct brd_device *brd_alloc(int i)
396 disk->first_minor = i * max_part; 396 disk->first_minor = i * max_part;
397 disk->fops = &brd_fops; 397 disk->fops = &brd_fops;
398 disk->private_data = brd; 398 disk->private_data = brd;
399 disk->queue = brd->brd_queue;
400 disk->flags = GENHD_FL_EXT_DEVT; 399 disk->flags = GENHD_FL_EXT_DEVT;
401 sprintf(disk->disk_name, "ram%d", i); 400 sprintf(disk->disk_name, "ram%d", i);
402 set_capacity(disk, rd_size * 2); 401 set_capacity(disk, rd_size * 2);
403 disk->queue->backing_dev_info->capabilities |= BDI_CAP_SYNCHRONOUS_IO; 402 brd->brd_queue->backing_dev_info->capabilities |= BDI_CAP_SYNCHRONOUS_IO;
404 403
405 /* Tell the block layer that this is not a rotational device */ 404 /* Tell the block layer that this is not a rotational device */
406 blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue); 405 blk_queue_flag_set(QUEUE_FLAG_NONROT, brd->brd_queue);
407 blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, disk->queue); 406 blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, brd->brd_queue);
408 407
409 return brd; 408 return brd;
410 409
@@ -436,6 +435,7 @@ static struct brd_device *brd_init_one(int i, bool *new)
436 435
437 brd = brd_alloc(i); 436 brd = brd_alloc(i);
438 if (brd) { 437 if (brd) {
438 brd->brd_disk->queue = brd->brd_queue;
439 add_disk(brd->brd_disk); 439 add_disk(brd->brd_disk);
440 list_add_tail(&brd->brd_list, &brd_devices); 440 list_add_tail(&brd->brd_list, &brd_devices);
441 } 441 }
@@ -503,8 +503,14 @@ static int __init brd_init(void)
503 503
504 /* point of no return */ 504 /* point of no return */
505 505
506 list_for_each_entry(brd, &brd_devices, brd_list) 506 list_for_each_entry(brd, &brd_devices, brd_list) {
507 /*
508 * associate with queue just before adding disk for
509 * avoiding to mess up failure path
510 */
511 brd->brd_disk->queue = brd->brd_queue;
507 add_disk(brd->brd_disk); 512 add_disk(brd->brd_disk);
513 }
508 514
509 blk_register_region(MKDEV(RAMDISK_MAJOR, 0), 1UL << MINORBITS, 515 blk_register_region(MKDEV(RAMDISK_MAJOR, 0), 1UL << MINORBITS,
510 THIS_MODULE, brd_probe, NULL, NULL); 516 THIS_MODULE, brd_probe, NULL, NULL);
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index e6273ae85246..cb0cc8685076 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -77,7 +77,6 @@
77#include <linux/falloc.h> 77#include <linux/falloc.h>
78#include <linux/uio.h> 78#include <linux/uio.h>
79#include <linux/ioprio.h> 79#include <linux/ioprio.h>
80#include <linux/blk-cgroup.h>
81 80
82#include "loop.h" 81#include "loop.h"
83 82
@@ -1760,8 +1759,8 @@ static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx,
1760 1759
1761 /* always use the first bio's css */ 1760 /* always use the first bio's css */
1762#ifdef CONFIG_BLK_CGROUP 1761#ifdef CONFIG_BLK_CGROUP
1763 if (cmd->use_aio && rq->bio && rq->bio->bi_blkg) { 1762 if (cmd->use_aio && rq->bio && rq->bio->bi_css) {
1764 cmd->css = &bio_blkcg(rq->bio)->css; 1763 cmd->css = rq->bio->bi_css;
1765 css_get(cmd->css); 1764 css_get(cmd->css);
1766 } else 1765 } else
1767#endif 1766#endif
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index dfc8de6ce525..a7daa8acbab3 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -1942,8 +1942,8 @@ static int exec_drive_taskfile(struct driver_data *dd,
1942 dev_warn(&dd->pdev->dev, 1942 dev_warn(&dd->pdev->dev,
1943 "data movement but " 1943 "data movement but "
1944 "sect_count is 0\n"); 1944 "sect_count is 0\n");
1945 err = -EINVAL; 1945 err = -EINVAL;
1946 goto abort; 1946 goto abort;
1947 } 1947 }
1948 } 1948 }
1949 } 1949 }
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index f3fb5bb8c82a..ac1cffd2a09b 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -542,7 +542,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio)
542 !discard_bio) 542 !discard_bio)
543 continue; 543 continue;
544 bio_chain(discard_bio, bio); 544 bio_chain(discard_bio, bio);
545 bio_clone_blkg_association(discard_bio, bio); 545 bio_clone_blkcg_association(discard_bio, bio);
546 if (mddev->gendisk) 546 if (mddev->gendisk)
547 trace_block_bio_remap(bdev_get_queue(rdev->bdev), 547 trace_block_bio_remap(bdev_get_queue(rdev->bdev),
548 discard_bio, disk_devt(mddev->gendisk), 548 discard_bio, disk_devt(mddev->gendisk),
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index e52b9d3c0bd6..0b70c8bab045 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -1704,7 +1704,6 @@ __nvme_fc_init_request(struct nvme_fc_ctrl *ctrl,
1704 op->fcp_req.rspaddr = &op->rsp_iu; 1704 op->fcp_req.rspaddr = &op->rsp_iu;
1705 op->fcp_req.rsplen = sizeof(op->rsp_iu); 1705 op->fcp_req.rsplen = sizeof(op->rsp_iu);
1706 op->fcp_req.done = nvme_fc_fcpio_done; 1706 op->fcp_req.done = nvme_fc_fcpio_done;
1707 op->fcp_req.private = &op->fcp_req.first_sgl[SG_CHUNK_SIZE];
1708 op->ctrl = ctrl; 1707 op->ctrl = ctrl;
1709 op->queue = queue; 1708 op->queue = queue;
1710 op->rq = rq; 1709 op->rq = rq;
@@ -1752,6 +1751,7 @@ nvme_fc_init_request(struct blk_mq_tag_set *set, struct request *rq,
1752 if (res) 1751 if (res)
1753 return res; 1752 return res;
1754 op->op.fcp_req.first_sgl = &op->sgl[0]; 1753 op->op.fcp_req.first_sgl = &op->sgl[0];
1754 op->op.fcp_req.private = &op->priv[0];
1755 return res; 1755 return res;
1756} 1756}
1757 1757
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index f30031945ee4..c33bb201b884 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1663,6 +1663,9 @@ static void nvme_map_cmb(struct nvme_dev *dev)
1663 struct pci_dev *pdev = to_pci_dev(dev->dev); 1663 struct pci_dev *pdev = to_pci_dev(dev->dev);
1664 int bar; 1664 int bar;
1665 1665
1666 if (dev->cmb_size)
1667 return;
1668
1666 dev->cmbsz = readl(dev->bar + NVME_REG_CMBSZ); 1669 dev->cmbsz = readl(dev->bar + NVME_REG_CMBSZ);
1667 if (!dev->cmbsz) 1670 if (!dev->cmbsz)
1668 return; 1671 return;
@@ -2147,7 +2150,6 @@ static void nvme_pci_disable(struct nvme_dev *dev)
2147{ 2150{
2148 struct pci_dev *pdev = to_pci_dev(dev->dev); 2151 struct pci_dev *pdev = to_pci_dev(dev->dev);
2149 2152
2150 nvme_release_cmb(dev);
2151 pci_free_irq_vectors(pdev); 2153 pci_free_irq_vectors(pdev);
2152 2154
2153 if (pci_is_enabled(pdev)) { 2155 if (pci_is_enabled(pdev)) {
@@ -2595,6 +2597,7 @@ static void nvme_remove(struct pci_dev *pdev)
2595 nvme_stop_ctrl(&dev->ctrl); 2597 nvme_stop_ctrl(&dev->ctrl);
2596 nvme_remove_namespaces(&dev->ctrl); 2598 nvme_remove_namespaces(&dev->ctrl);
2597 nvme_dev_disable(dev, true); 2599 nvme_dev_disable(dev, true);
2600 nvme_release_cmb(dev);
2598 nvme_free_host_mem(dev); 2601 nvme_free_host_mem(dev);
2599 nvme_dev_remove_admin(dev); 2602 nvme_dev_remove_admin(dev);
2600 nvme_free_queues(dev, 0); 2603 nvme_free_queues(dev, 0);