nvmet_fc: correct broken add_port
Subsystems (3)
PATCH 1/1 nvmet_fc: correct broken add_port
prior patch to remove the add_port reference also removed the saving of the port pointer, which mean any io had no port pointer thus was rejected. Basically nothing works.
Restore the saving of the port pointer.
---
this restores operation but if the targetport is removed, it will no longer be functional if it comes back. I will be submitting a more involved patch for this shortly
drivers/nvme/target/fc.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/target/fc.c +1 -0
@@ -2522,6 +2522,7 @@ nvmet_fc_add_port(struct nvmet_port *port)list_for_each_entry (tgtport, &nvmet_fc_target_list, tgt_list) {if ((tgtport->fc_target_port.node_name == traddr.nn) && (tgtport->fc_target_port.port_name == traddr.pn)) { + tgtport->port = port; ret =0 ;break ; }
Signature · 1 line
2.13.1
PATCH 1/1 nvmet_fc: correct broken add_port
Quoted 4 lines · James Smart
prior patch to remove the
add_portreference also removed the saving of the port pointer, which mean any io had no port pointer thus was rejected. Basically nothing works.
Quoted 8 lines
Restore the saving of the port pointer.
Signed-off-by James Smart <james.smart at broadcom.com>---
this restores operation but if the targetport is removed, it will no longer be functional if it comes back. I will be submitting a more involved patch for this shortly
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
But a Fixes: and/or Cc: <stable at vger.kernel.org> might have been a good Idea as well.
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
PATCH 1/1 nvmet_fc: correct broken add_port
Quoted 3 lines · Johannes Thumshirn
But a Fixes: and/or Cc: <stable at vger.kernel.org> might have been a good Idea as well.
Fixes perhaps.? The patch that introduced the issue (a0b69cc8e5caff3cb6442dfa807f47b44e716aad) is only in nvme-4.16, so it doesn't quite apply.
-- james
Quoted 8 lines · James Smart
Quoted 3 lines · Johannes Thumshirn
But a Fixes: and/or Cc: <stable at vger.kernel.org> might have been a good Idea as well.
Fixes perhaps.? The patch that introduced the issue (
a0b69cc8e5caff3cb6442dfa807f47b44e716aad) is only in nvme-4.16, so it doesn't quite apply.
Right, a Fixes: reference is useful even if the Cc: stable isn't relevant.
This fixes the issue I reported -- where I needed to revert commit a0b69cc8e5 ("nvmet-fc: cleanup nvmet add_port/remove_port") to allow nvme connect to work with fcloop.
Christoph, please feel free to add:
PATCH 1/1 nvmet_fc: correct broken add_port
In reply to James SmartThanks,
I've folded this into the patch introducing the problem.