]> www.infradead.org Git - nvme.git/commitdiff
nvmet: Add drvdata field to struct nvmet_ctrl
authorDamien Le Moal <dlemoal@kernel.org>
Sat, 4 Jan 2025 04:59:38 +0000 (13:59 +0900)
committerKeith Busch <kbusch@kernel.org>
Sat, 11 Jan 2025 03:30:47 +0000 (19:30 -0800)
Allow a target driver to attach private data to a target controller by
adding the new field drvdata to struct nvmet_ctrl.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com>
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/nvmet.h

index e68f1927339c700b9c189f619223b94ea53f310d..abcc1f3828b7992a29eb319cd16db781c7eefb44 100644 (file)
@@ -238,6 +238,8 @@ struct nvmet_ctrl {
        struct nvmet_subsys     *subsys;
        struct nvmet_sq         **sqs;
 
+       void                    *drvdata;
+
        bool                    reset_tbkas;
 
        struct mutex            lock;