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

Commit 70bfc741 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:
 "A small set of fixes that should go into this release. This contains:

   - An NVMe pull request from Christoph, with a few select fixes.

     One of them fix a polling regression in this series, in which it's
     trivial to cause the kernel to disable most of the hardware queue
     interrupts.

   - Fixup for a blk-mq queue usage imbalance on request allocation,
     from Keith.

   - A xen block pull request from Konrad, fixing two issues with
     xen/xen-blkfront"

* 'for-linus' of git://git.kernel.dk/linux-block:
  blk-mq-pci: add a fallback when pci_irq_get_affinity returns NULL
  nvme-pci: set cqe_seen on polled completions
  nvme-fabrics: fix reporting of unrecognized options
  nvmet-fc: eliminate incorrect static markers on local variables
  nvmet-fc: correct use after free on list teardown
  nvmet: don't overwrite identify sn/fr with 0-bytes
  xen-blkfront: use a right index when checking requests
  xen: fix bio vec merging
  blk-mq: Fix queue usage on failed request allocation
parents edb20a1b c0053903
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -36,12 +36,18 @@ int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev)
	for (queue = 0; queue < set->nr_hw_queues; queue++) {
		mask = pci_irq_get_affinity(pdev, queue);
		if (!mask)
			return -EINVAL;
			goto fallback;

		for_each_cpu(cpu, mask)
			set->mq_map[cpu] = queue;
	}

	return 0;

fallback:
	WARN_ON_ONCE(set->nr_hw_queues > 1);
	for_each_possible_cpu(cpu)
		set->mq_map[cpu] = 0;
	return 0;
}
EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues);
+2 −3
Original line number Diff line number Diff line
@@ -360,12 +360,12 @@ struct request *blk_mq_alloc_request(struct request_queue *q, unsigned int op,
		return ERR_PTR(ret);

	rq = blk_mq_get_request(q, NULL, op, &alloc_data);
	blk_queue_exit(q);

	if (!rq)
		return ERR_PTR(-EWOULDBLOCK);

	blk_mq_put_ctx(alloc_data.ctx);
	blk_queue_exit(q);

	rq->__data_len = 0;
	rq->__sector = (sector_t) -1;
@@ -411,12 +411,11 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q,
	alloc_data.ctx = __blk_mq_get_ctx(q, cpu);

	rq = blk_mq_get_request(q, NULL, op, &alloc_data);
	blk_queue_exit(q);

	if (!rq)
		return ERR_PTR(-EWOULDBLOCK);

	blk_queue_exit(q);

	return rq;
}
EXPORT_SYMBOL_GPL(blk_mq_alloc_request_hctx);
+3 −3
Original line number Diff line number Diff line
@@ -2075,9 +2075,9 @@ static int blkfront_resume(struct xenbus_device *dev)
			/*
			 * Get the bios in the request so we can re-queue them.
			 */
			if (req_op(shadow[i].request) == REQ_OP_FLUSH ||
			    req_op(shadow[i].request) == REQ_OP_DISCARD ||
			    req_op(shadow[i].request) == REQ_OP_SECURE_ERASE ||
			if (req_op(shadow[j].request) == REQ_OP_FLUSH ||
			    req_op(shadow[j].request) == REQ_OP_DISCARD ||
			    req_op(shadow[j].request) == REQ_OP_SECURE_ERASE ||
			    shadow[j].request->cmd_flags & REQ_FUA) {
				/*
				 * Flush operations don't contain bios, so
+2 −1
Original line number Diff line number Diff line
@@ -794,7 +794,8 @@ static int nvmf_check_allowed_opts(struct nvmf_ctrl_options *opts,
		int i;

		for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) {
			if (opt_tokens[i].token & ~allowed_opts) {
			if ((opt_tokens[i].token & opts->mask) &&
			    (opt_tokens[i].token & ~allowed_opts)) {
				pr_warn("invalid parameter '%s'\n",
					opt_tokens[i].pattern);
			}
+2 −3
Original line number Diff line number Diff line
@@ -801,6 +801,7 @@ static inline void nvme_handle_cqe(struct nvme_queue *nvmeq,
		return;
	}

	nvmeq->cqe_seen = 1;
	req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id);
	nvme_end_request(req, cqe->status, cqe->result);
}
@@ -830,10 +831,8 @@ static void nvme_process_cq(struct nvme_queue *nvmeq)
		consumed++;
	}

	if (consumed) {
	if (consumed)
		nvme_ring_cq_doorbell(nvmeq);
		nvmeq->cqe_seen = 1;
	}
}

static irqreturn_t nvme_irq(int irq, void *data)
Loading