linux/drivers/nvme/target
Christoph Hellwig d22524a478 nvme: switch controller refcounting to use struct device
Instead of allocating a separate struct device for the character device
handle embedd it into struct nvme_ctrl and use it for the main controller
refcounting.  This removes double refcounting and gets us an automatic
reference for the character device operations.  We keep ctrl->device as a
pointer for now to avoid chaning printks all over, but in the future we
could look into message printing helpers that take a controller structure
similar to what other subsystems do.

Note the delete_ctrl operation always already has a reference (either
through sysfs due this change, or because every open file on the
/dev/nvme-fabrics node has a refernece) when it is entered now, so we
don't need to do the unless_zero variant there.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
2017-10-27 09:04:07 +03:00
..
Kconfig nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
Makefile nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
admin-cmd.c nvmet: add support for reporting the host identifier 2017-08-30 15:05:18 +02:00
configfs.c nvmet: use NVME_NSID_ALL 2017-08-28 21:38:19 +02:00
core.c nvmet: Change max_nsid in subsystem due to ns_disable if needed 2017-10-20 12:06:02 +02:00
discovery.c nvme: use a single NVME_AQ_DEPTH and relax it to 32 2017-06-28 08:14:13 -06:00
fabrics-cmd.c nvmet: implement valid sqhd values in completions 2017-09-25 08:56:05 -06:00
fc.c nvmet-fc: ensure target queue id within range. 2017-09-25 12:42:11 -06:00
fcloop.c nvme-fcloop: fix port deletes and callbacks 2017-09-25 12:42:11 -06:00
io-cmd.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
loop.c nvme: switch controller refcounting to use struct device 2017-10-27 09:04:07 +03:00
nvmet.h nvmet: bump NVMET_NR_QUEUES to 128 2017-10-04 09:43:58 +02:00
rdma.c nvmet-rdma: remove redundant empty device add callout 2017-08-18 10:46:20 -04:00