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

Commit d65cfe90 authored by Jens Axboe's avatar Jens Axboe
Browse files

Merge branch 'nvmf-4.10' of git://git.infradead.org/nvme-fabrics into for-4.10/block

Sagi writes:

The major addition here is the nvme FC transport implementation
from James.

What else:
- some cleanups and memory leak fixes in the host side fabrics code from Bart
- possible rcu violation fix from Sasha
- logging change from Max
- small include cleanup
parents 6e85eaf3 475d0fe7
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -8659,6 +8659,16 @@ L: linux-nvme@lists.infradead.org
S:	Supported
S:	Supported
F:	drivers/nvme/target/
F:	drivers/nvme/target/


NVM EXPRESS FC TRANSPORT DRIVERS
M:	James Smart <james.smart@broadcom.com>
L:	linux-nvme@lists.infradead.org
S:	Supported
F:	include/linux/nvme-fc.h
F:	include/linux/nvme-fc-driver.h
F:	drivers/nvme/host/fc.c
F:	drivers/nvme/target/fc.c
F:	drivers/nvme/target/fcloop.c

NVMEM FRAMEWORK
NVMEM FRAMEWORK
M:	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
M:	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
M:	Maxime Ripard <maxime.ripard@free-electrons.com>
M:	Maxime Ripard <maxime.ripard@free-electrons.com>
+17 −0
Original line number Original line Diff line number Diff line
@@ -43,3 +43,20 @@ config NVME_RDMA
	  from https://github.com/linux-nvme/nvme-cli.
	  from https://github.com/linux-nvme/nvme-cli.


	  If unsure, say N.
	  If unsure, say N.

config NVME_FC
	tristate "NVM Express over Fabrics FC host driver"
	depends on BLOCK
	depends on HAS_DMA
	select NVME_CORE
	select NVME_FABRICS
	select SG_POOL
	help
	  This provides support for the NVMe over Fabrics protocol using
	  the FC transport.  This allows you to use remote block devices
	  exported using the NVMe protocol set.

	  To configure a NVMe over Fabrics controller use the nvme-cli tool
	  from https://github.com/linux-nvme/nvme-cli.

	  If unsure, say N.
+3 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,7 @@ obj-$(CONFIG_NVME_CORE) += nvme-core.o
obj-$(CONFIG_BLK_DEV_NVME)		+= nvme.o
obj-$(CONFIG_BLK_DEV_NVME)		+= nvme.o
obj-$(CONFIG_NVME_FABRICS)		+= nvme-fabrics.o
obj-$(CONFIG_NVME_FABRICS)		+= nvme-fabrics.o
obj-$(CONFIG_NVME_RDMA)			+= nvme-rdma.o
obj-$(CONFIG_NVME_RDMA)			+= nvme-rdma.o
obj-$(CONFIG_NVME_FC)			+= nvme-fc.o


nvme-core-y				:= core.o
nvme-core-y				:= core.o
nvme-core-$(CONFIG_BLK_DEV_NVME_SCSI)	+= scsi.o
nvme-core-$(CONFIG_BLK_DEV_NVME_SCSI)	+= scsi.o
@@ -12,3 +13,5 @@ nvme-y += pci.o
nvme-fabrics-y				+= fabrics.o
nvme-fabrics-y				+= fabrics.o


nvme-rdma-y				+= rdma.o
nvme-rdma-y				+= rdma.o

nvme-fc-y				+= fc.o
+2 −1
Original line number Original line Diff line number Diff line
@@ -303,7 +303,6 @@ static inline void nvme_setup_rw(struct nvme_ns *ns, struct request *req,


	memset(cmnd, 0, sizeof(*cmnd));
	memset(cmnd, 0, sizeof(*cmnd));
	cmnd->rw.opcode = (rq_data_dir(req) ? nvme_cmd_write : nvme_cmd_read);
	cmnd->rw.opcode = (rq_data_dir(req) ? nvme_cmd_write : nvme_cmd_read);
	cmnd->rw.command_id = req->tag;
	cmnd->rw.nsid = cpu_to_le32(ns->ns_id);
	cmnd->rw.nsid = cpu_to_le32(ns->ns_id);
	cmnd->rw.slba = cpu_to_le64(nvme_block_nr(ns, blk_rq_pos(req)));
	cmnd->rw.slba = cpu_to_le64(nvme_block_nr(ns, blk_rq_pos(req)));
	cmnd->rw.length = cpu_to_le16((blk_rq_bytes(req) >> ns->lba_shift) - 1);
	cmnd->rw.length = cpu_to_le16((blk_rq_bytes(req) >> ns->lba_shift) - 1);
@@ -345,6 +344,8 @@ int nvme_setup_cmd(struct nvme_ns *ns, struct request *req,
	else
	else
		nvme_setup_rw(ns, req, cmd);
		nvme_setup_rw(ns, req, cmd);


	cmd->common.command_id = req->tag;

	return ret;
	return ret;
}
}
EXPORT_SYMBOL_GPL(nvme_setup_cmd);
EXPORT_SYMBOL_GPL(nvme_setup_cmd);
+4 −3
Original line number Original line Diff line number Diff line
@@ -666,10 +666,12 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
			if (nqnlen >= NVMF_NQN_SIZE) {
			if (nqnlen >= NVMF_NQN_SIZE) {
				pr_err("%s needs to be < %d bytes\n",
				pr_err("%s needs to be < %d bytes\n",
					p, NVMF_NQN_SIZE);
					p, NVMF_NQN_SIZE);
				kfree(p);
				ret = -EINVAL;
				ret = -EINVAL;
				goto out;
				goto out;
			}
			}
			opts->host = nvmf_host_add(p);
			opts->host = nvmf_host_add(p);
			kfree(p);
			if (!opts->host) {
			if (!opts->host) {
				ret = -ENOMEM;
				ret = -ENOMEM;
				goto out;
				goto out;
@@ -825,8 +827,7 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count)
out_unlock:
out_unlock:
	mutex_unlock(&nvmf_transports_mutex);
	mutex_unlock(&nvmf_transports_mutex);
out_free_opts:
out_free_opts:
	nvmf_host_put(opts->host);
	nvmf_free_options(opts);
	kfree(opts);
	return ERR_PTR(ret);
	return ERR_PTR(ret);
}
}


Loading