Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d02369d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Final round of fixes for this merge window - some of this has come up
  after the initial pull request, and some of it was put in a post-merge
  branch before the merge window.

  This contains:

   - Fix for a bad check for an error on dma mapping in the mtip32xx
     driver, from Alexey Khoroshilov.

   - A set of fixes for lightnvm, from Javier, Matias, and Wenwei.

   - An NVMe completion record corruption fix from Marta, ensuring that
     we read things in the right order.

   - Two writeback fixes from Tejun, marked for stable@ as well.

   - A blk-mq sw queue iterator fix from Thomas, fixing an oops for
     sparse CPU maps.  They hit this in the hot plug/unplug rework"

* 'for-linus' of git://git.kernel.dk/linux-block:
  nvme: avoid cqe corruption when update at the same time as read
  writeback, cgroup: fix use of the wrong bdi_writeback which mismatches the inode
  writeback, cgroup: fix premature wb_put() in locked_inode_to_wb_and_lock_list()
  blk-mq: Use proper cpumask iterator
  mtip32xx: fix checks for dma mapping errors
  lightnvm: do not load L2P table if not supported
  lightnvm: do not reserve lun on l2p loading
  nvme: lightnvm: return ppa completion status
  lightnvm: add a bitmap of luns
  lightnvm: specify target's logical address area
  null_blk: add lightnvm null_blk device to the nullb_list
parents 8f40842e d783e0bd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -416,13 +416,15 @@ void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx)
static void blk_mq_sysfs_init(struct request_queue *q)
{
	struct blk_mq_ctx *ctx;
	int i;
	int cpu;

	kobject_init(&q->mq_kobj, &blk_mq_ktype);

	queue_for_each_ctx(q, ctx, i)
	for_each_possible_cpu(cpu) {
		ctx = per_cpu_ptr(q->queue_ctx, cpu);
		kobject_init(&ctx->kobj, &blk_mq_ctx_ktype);
	}
}

int blk_mq_register_disk(struct gendisk *disk)
{
+2 −1
Original line number Diff line number Diff line
@@ -1798,11 +1798,12 @@ static void blk_mq_map_swqueue(struct request_queue *q,
	/*
	 * Map software to hardware queues
	 */
	queue_for_each_ctx(q, ctx, i) {
	for_each_possible_cpu(i) {
		/* If the cpu isn't online, the cpu is mapped to first hctx */
		if (!cpumask_test_cpu(i, online_mask))
			continue;

		ctx = per_cpu_ptr(q->queue_ctx, i);
		hctx = q->mq_ops->map_queue(q, i);

		cpumask_set_cpu(i, hctx->cpumask);
+2 −2
Original line number Diff line number Diff line
@@ -2051,7 +2051,7 @@ static int exec_drive_taskfile(struct driver_data *dd,
					 outbuf,
					 taskout,
					 DMA_TO_DEVICE);
		if (outbuf_dma == 0) {
		if (pci_dma_mapping_error(dd->pdev, outbuf_dma)) {
			err = -ENOMEM;
			goto abort;
		}
@@ -2068,7 +2068,7 @@ static int exec_drive_taskfile(struct driver_data *dd,
		inbuf_dma = pci_map_single(dd->pdev,
					 inbuf,
					 taskin, DMA_FROM_DEVICE);
		if (inbuf_dma == 0) {
		if (pci_dma_mapping_error(dd->pdev, inbuf_dma)) {
			err = -ENOMEM;
			goto abort;
		}
+2 −1
Original line number Diff line number Diff line
@@ -742,10 +742,11 @@ static int null_add_dev(void)

	add_disk(disk);

done:
	mutex_lock(&lock);
	list_add_tail(&nullb->list, &nullb_list);
	mutex_unlock(&lock);
done:

	return 0;

out_cleanup_lightnvm:
+7 −0
Original line number Diff line number Diff line
@@ -464,8 +464,13 @@ static int nvm_core_init(struct nvm_dev *dev)
	dev->nr_luns = dev->luns_per_chnl * dev->nr_chnls;

	dev->total_secs = dev->nr_luns * dev->sec_per_lun;
	dev->lun_map = kcalloc(BITS_TO_LONGS(dev->nr_luns),
					sizeof(unsigned long), GFP_KERNEL);
	if (!dev->lun_map)
		return -ENOMEM;
	INIT_LIST_HEAD(&dev->online_targets);
	mutex_init(&dev->mlock);
	spin_lock_init(&dev->lock);

	return 0;
}
@@ -585,6 +590,7 @@ int nvm_register(struct request_queue *q, char *disk_name,

	return 0;
err_init:
	kfree(dev->lun_map);
	kfree(dev);
	return ret;
}
@@ -607,6 +613,7 @@ void nvm_unregister(char *disk_name)
	up_write(&nvm_lock);

	nvm_exit(dev);
	kfree(dev->lun_map);
	kfree(dev);
}
EXPORT_SYMBOL(nvm_unregister);
Loading