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

Commit 62f8c405 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull block layer fixes from Jens Axboe:
 "A set of fixes for the current series, one fixing a regression with
  block size < page cache size in the alias series from Jan. Outside of
  that, two small cleanups for wbt from Bart, a nvme pull request from
  Christoph, and a few small fixes of documentation updates"

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: fix up io_poll documentation
  block: Avoid that sparse complains about context imbalance in __wbt_wait()
  block: Make wbt_wait() definition consistent with declaration
  clean_bdev_aliases: Prevent cleaning blocks that are not in block range
  genhd: remove dead and duplicated scsi code
  block: add back plugging in __blkdev_direct_IO
  nvmet/fcloop: remove some logically dead code performing redundant ret checks
  nvmet: fix KATO offset in Set Features
  nvme/fc: simplify error handling of nvme_fc_create_hw_io_queues
  nvme/fc: correct some printk information
  nvme/scsi: Remove START STOP emulation
  nvme/pci: Delete misleading queue-wrap comment
  nvme/pci: Fix whitespace problem
  nvme: simplify stripe quirk
  nvme: update maintainers information
parents 9f744519 7158339d
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -54,9 +54,9 @@ This is the hardware sector size of the device, in bytes.


io_poll (RW)
io_poll (RW)
------------
------------
When read, this file shows the total number of block IO polls and how
When read, this file shows whether polling is enabled (1) or disabled
many returned success.  Writing '0' to this file will disable polling
(0).  Writing '0' to this file will disable polling for this device.
for this device.  Writing any non-zero value will enable this feature.
Writing any non-zero value will enable this feature.


io_poll_delay (RW)
io_poll_delay (RW)
------------------
------------------
+7 −2
Original line number Original line Diff line number Diff line
@@ -8854,17 +8854,22 @@ F: drivers/video/fbdev/nvidia/
NVM EXPRESS DRIVER
NVM EXPRESS DRIVER
M:	Keith Busch <keith.busch@intel.com>
M:	Keith Busch <keith.busch@intel.com>
M:	Jens Axboe <axboe@fb.com>
M:	Jens Axboe <axboe@fb.com>
M:	Christoph Hellwig <hch@lst.de>
M:	Sagi Grimberg <sagi@grimberg.me>
L:	linux-nvme@lists.infradead.org
L:	linux-nvme@lists.infradead.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
T:	git://git.infradead.org/nvme.git
W:	https://kernel.googlesource.com/pub/scm/linux/kernel/git/axboe/linux-block/
W:	http://git.infradead.org/nvme.git
S:	Supported
S:	Supported
F:	drivers/nvme/host/
F:	drivers/nvme/host/
F:	include/linux/nvme.h
F:	include/linux/nvme.h
F:	include/uapi/linux/nvme_ioctl.h


NVM EXPRESS TARGET DRIVER
NVM EXPRESS TARGET DRIVER
M:	Christoph Hellwig <hch@lst.de>
M:	Christoph Hellwig <hch@lst.de>
M:	Sagi Grimberg <sagi@grimberg.me>
M:	Sagi Grimberg <sagi@grimberg.me>
L:	linux-nvme@lists.infradead.org
L:	linux-nvme@lists.infradead.org
T:	git://git.infradead.org/nvme.git
W:	http://git.infradead.org/nvme.git
S:	Supported
S:	Supported
F:	drivers/nvme/target/
F:	drivers/nvme/target/


+7 −6
Original line number Original line Diff line number Diff line
@@ -544,6 +544,8 @@ static inline bool may_queue(struct rq_wb *rwb, struct rq_wait *rqw,
 * the timer to kick off queuing again.
 * the timer to kick off queuing again.
 */
 */
static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
	__releases(lock)
	__acquires(lock)
{
{
	struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd());
	struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd());
	DEFINE_WAIT(wait);
	DEFINE_WAIT(wait);
@@ -558,13 +560,12 @@ static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
		if (may_queue(rwb, rqw, &wait, rw))
		if (may_queue(rwb, rqw, &wait, rw))
			break;
			break;


		if (lock)
		if (lock) {
			spin_unlock_irq(lock);
			spin_unlock_irq(lock);

			io_schedule();
			io_schedule();

		if (lock)
			spin_lock_irq(lock);
			spin_lock_irq(lock);
		} else
			io_schedule();
	} while (1);
	} while (1);


	finish_wait(&rqw->wait, &wait);
	finish_wait(&rqw->wait, &wait);
@@ -595,7 +596,7 @@ static inline bool wbt_should_throttle(struct rq_wb *rwb, struct bio *bio)
 * in an irq held spinlock, if it holds one when calling this function.
 * in an irq held spinlock, if it holds one when calling this function.
 * If we do sleep, we'll release and re-grab it.
 * If we do sleep, we'll release and re-grab it.
 */
 */
unsigned int wbt_wait(struct rq_wb *rwb, struct bio *bio, spinlock_t *lock)
enum wbt_flags wbt_wait(struct rq_wb *rwb, struct bio *bio, spinlock_t *lock)
{
{
	unsigned int ret = 0;
	unsigned int ret = 0;


+2 −15
Original line number Original line Diff line number Diff line
@@ -1193,8 +1193,8 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
		blk_queue_max_hw_sectors(q, ctrl->max_hw_sectors);
		blk_queue_max_hw_sectors(q, ctrl->max_hw_sectors);
		blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
		blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
	}
	}
	if (ctrl->stripe_size)
	if (ctrl->quirks & NVME_QUIRK_STRIPE_SIZE)
		blk_queue_chunk_sectors(q, ctrl->stripe_size >> 9);
		blk_queue_chunk_sectors(q, ctrl->max_hw_sectors);
	blk_queue_virt_boundary(q, ctrl->page_size - 1);
	blk_queue_virt_boundary(q, ctrl->page_size - 1);
	if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
	if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
		vwc = true;
		vwc = true;
@@ -1250,19 +1250,6 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
	ctrl->max_hw_sectors =
	ctrl->max_hw_sectors =
		min_not_zero(ctrl->max_hw_sectors, max_hw_sectors);
		min_not_zero(ctrl->max_hw_sectors, max_hw_sectors);


	if ((ctrl->quirks & NVME_QUIRK_STRIPE_SIZE) && id->vs[3]) {
		unsigned int max_hw_sectors;

		ctrl->stripe_size = 1 << (id->vs[3] + page_shift);
		max_hw_sectors = ctrl->stripe_size >> (page_shift - 9);
		if (ctrl->max_hw_sectors) {
			ctrl->max_hw_sectors = min(max_hw_sectors,
							ctrl->max_hw_sectors);
		} else {
			ctrl->max_hw_sectors = max_hw_sectors;
		}
	}

	nvme_set_queue_limits(ctrl, ctrl->admin_q);
	nvme_set_queue_limits(ctrl, ctrl->admin_q);
	ctrl->sgls = le32_to_cpu(id->sgls);
	ctrl->sgls = le32_to_cpu(id->sgls);
	ctrl->kas = le16_to_cpu(id->kas);
	ctrl->kas = le16_to_cpu(id->kas);
+10 −9
Original line number Original line Diff line number Diff line
@@ -1491,19 +1491,20 @@ static int
nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
{
{
	struct nvme_fc_queue *queue = &ctrl->queues[1];
	struct nvme_fc_queue *queue = &ctrl->queues[1];
	int i, j, ret;
	int i, ret;


	for (i = 1; i < ctrl->queue_count; i++, queue++) {
	for (i = 1; i < ctrl->queue_count; i++, queue++) {
		ret = __nvme_fc_create_hw_queue(ctrl, queue, i, qsize);
		ret = __nvme_fc_create_hw_queue(ctrl, queue, i, qsize);
		if (ret) {
		if (ret)
			for (j = i-1; j >= 0; j--)
			goto delete_queues;
				__nvme_fc_delete_hw_queue(ctrl,
						&ctrl->queues[j], j);
			return ret;
		}
	}
	}


	return 0;
	return 0;

delete_queues:
	for (; i >= 0; i--)
		__nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i);
	return ret;
}
}


static int
static int
@@ -2401,8 +2402,8 @@ __nvme_fc_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
	WARN_ON_ONCE(!changed);
	WARN_ON_ONCE(!changed);


	dev_info(ctrl->ctrl.device,
	dev_info(ctrl->ctrl.device,
		"NVME-FC{%d}: new ctrl: NQN \"%s\" (%p)\n",
		"NVME-FC{%d}: new ctrl: NQN \"%s\"\n",
		ctrl->cnum, ctrl->ctrl.opts->subsysnqn, &ctrl);
		ctrl->cnum, ctrl->ctrl.opts->subsysnqn);


	kref_get(&ctrl->ctrl.kref);
	kref_get(&ctrl->ctrl.kref);


Loading