nvme_fc: require target or discovery role for fc-nvme targets
Subsystems (2)
PATCH 1/1 nvme_fc: require target or discovery role for fc-nvme targets
From: James Smart <[email protected]>
In order to create an association, the remoteport must be serving either a target role or a discovery role.
Signed-off-by James Smart <james.smart at broadcom.com>
--- drivers/nvme/host/fc.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/nvme/host/fc.c +6 -0
@@ -2712,6 +2712,12 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,unsigned long flags;int ret, idx; +if (!(rport->remoteport.port_role & + (FC_PORT_ROLE_NVME_DISCOVERY |FC_PORT_ROLE_NVME_TARGET ))) { + ret = -EBADR ; + goto out_fail; + } + ctrl =kzalloc (sizeof (*ctrl),GFP_KERNEL );if (!ctrl) { ret = -ENOMEM ;
Signature · 1 line
2.11.0
PATCH 1/1 nvme_fc: require target or discovery role for fc-nvme targets
Quoted 7 lines · On 05/06/2017 01:13 AM, [email protected] wrote:
From: James Smart <jsmart2021 at gmail.com>
In order to create an association, the remoteport must be serving either a target role or a discovery role.
Signed-off-by James Smart <james.smart at broadcom.com>---
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Christoph Hellwig
AppliedPATCH 1/1 nvme_fc: require target or discovery role for fc-nvme targets
In reply to [email protected]Applied to nvme-4.12.