nvmet: keep a port pointer in nvmet_ctrl
authorChristoph Hellwig <hch@lst.de>
Thu, 7 Jun 2018 13:09:50 +0000 (15:09 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 27 Jul 2018 17:12:52 +0000 (19:12 +0200)
This will be needed for the ANA AEN code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
drivers/nvme/target/core.c
drivers/nvme/target/nvmet.h

index ddd85715a00ab4e5ec5af1f04521e10e47f9432a..cbcd19f52121aba1e09187c1c947bb21bc3bd016 100644 (file)
@@ -876,6 +876,8 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
 
        nvmet_init_cap(ctrl);
 
+       ctrl->port = req->port;
+
        INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work);
        INIT_LIST_HEAD(&ctrl->async_events);
 
index 68899385540260b68b6a659975fc2fb53c239f1a..de12dcbfd3f3e5bac80886dfc2bbfc12a05f0e95 100644 (file)
@@ -140,6 +140,8 @@ struct nvmet_ctrl {
        u16                     cntlid;
        u32                     kato;
 
+       struct nvmet_port       *port;
+
        u32                     aen_enabled;
        unsigned long           aen_masked;
        struct nvmet_req        *async_event_cmds[NVMET_ASYNC_EVENTS];