Commit 0217a27e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'block-5.13-2021-05-28' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:

 - NVMe pull request (Christoph):
      - fix a memory leak in nvme_cdev_add (Guoqing Jiang)
      - fix inline data size comparison in nvmet_tcp_queue_response (Hou
        Pu)
      - fix false keep-alive timeout when a controller is torn down
        (Sagi Grimberg)
      - fix a nvme-tcp Kconfig dependency (Sagi Grimberg)
      - short-circuit reconnect retries for FC (Hannes Reinecke)
      - decode host pathing error for connect (Hannes Reinecke)

 - MD pull request (Song):
      - Fix incorrect chunk boundary assert (Christoph)

 - Fix s390/dasd verification panic (Stefan)

* tag 'block-5.13-2021-05-28' of git://git.kernel.dk/linux-block:
  nvmet: fix false keep-alive timeout when a controller is torn down
  nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response
  nvme-tcp: remove incorrect Kconfig dep in BLK_DEV_NVME
  md/raid5: remove an incorrect assert in in_chunk_boundary
  s390/dasd: add missing discipline function
  nvme-fabrics: decode host pathing error for connect
  nvme-fc: short-circuit reconnect retries
  nvme: fix potential memory leaks in nvme_cdev_add
parents b3dbbae6 a4b58f17
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)
	unsigned int chunk_sectors;
	unsigned int bio_sectors = bio_sectors(bio);

	WARN_ON_ONCE(bio->bi_bdev->bd_partno);

	chunk_sectors = min(conf->chunk_sectors, conf->prev_chunk_sectors);
	return  chunk_sectors >=
		((sector & (chunk_sectors - 1)) + bio_sectors);
+2 −1
Original line number Diff line number Diff line
@@ -71,7 +71,8 @@ config NVME_FC
config NVME_TCP
	tristate "NVM Express over Fabrics TCP host driver"
	depends on INET
	depends on BLK_DEV_NVME
	depends on BLOCK
	select NVME_CORE
	select NVME_FABRICS
	select CRYPTO
	select CRYPTO_CRC32C
+3 −1
Original line number Diff line number Diff line
@@ -3485,8 +3485,10 @@ int nvme_cdev_add(struct cdev *cdev, struct device *cdev_device,
	cdev_init(cdev, fops);
	cdev->owner = owner;
	ret = cdev_device_add(cdev, cdev_device);
	if (ret)
	if (ret) {
		put_device(cdev_device);
		ida_simple_remove(&nvme_ns_chr_minor_ida, minor);
	}
	return ret;
}

+5 −0
Original line number Diff line number Diff line
@@ -336,6 +336,11 @@ static void nvmf_log_connect_error(struct nvme_ctrl *ctrl,
			cmd->connect.recfmt);
		break;

	case NVME_SC_HOST_PATH_ERROR:
		dev_err(ctrl->device,
			"Connect command failed: host path error\n");
		break;

	default:
		dev_err(ctrl->device,
			"Connect command failed, error wo/DNR bit: %d\n",
+17 −8
Original line number Diff line number Diff line
@@ -3107,6 +3107,7 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
	if (ctrl->ctrl.icdoff) {
		dev_err(ctrl->ctrl.device, "icdoff %d is not supported!\n",
				ctrl->ctrl.icdoff);
		ret = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
		goto out_disconnect_admin_queue;
	}

@@ -3114,6 +3115,7 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
	if (!(ctrl->ctrl.sgls & ((1 << 0) | (1 << 1)))) {
		dev_err(ctrl->ctrl.device,
			"Mandatory sgls are not supported!\n");
		ret = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
		goto out_disconnect_admin_queue;
	}

@@ -3280,11 +3282,13 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)
	if (ctrl->ctrl.state != NVME_CTRL_CONNECTING)
		return;

	if (portptr->port_state == FC_OBJSTATE_ONLINE)
	if (portptr->port_state == FC_OBJSTATE_ONLINE) {
		dev_info(ctrl->ctrl.device,
			"NVME-FC{%d}: reset: Reconnect attempt failed (%d)\n",
			ctrl->cnum, status);
	else if (time_after_eq(jiffies, rport->dev_loss_end))
		if (status > 0 && (status & NVME_SC_DNR))
			recon = false;
	} else if (time_after_eq(jiffies, rport->dev_loss_end))
		recon = false;

	if (recon && nvmf_should_reconnect(&ctrl->ctrl)) {
@@ -3298,12 +3302,17 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)

		queue_delayed_work(nvme_wq, &ctrl->connect_work, recon_delay);
	} else {
		if (portptr->port_state == FC_OBJSTATE_ONLINE)
		if (portptr->port_state == FC_OBJSTATE_ONLINE) {
			if (status > 0 && (status & NVME_SC_DNR))
				dev_warn(ctrl->ctrl.device,
				"NVME-FC{%d}: Max reconnect attempts (%d) "
				"reached.\n",
				ctrl->cnum, ctrl->ctrl.nr_reconnects);
					 "NVME-FC{%d}: reconnect failure\n",
					 ctrl->cnum);
			else
				dev_warn(ctrl->ctrl.device,
					 "NVME-FC{%d}: Max reconnect attempts "
					 "(%d) reached.\n",
					 ctrl->cnum, ctrl->ctrl.nr_reconnects);
		} else
			dev_warn(ctrl->ctrl.device,
				"NVME-FC{%d}: dev_loss_tmo (%d) expired "
				"while waiting for remoteport connectivity.\n",
Loading