2 * NVMe over Fabrics loopback device.
3 * Copyright (c) 2015-2016 HGST, a Western Digital Company.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15 #include <linux/scatterlist.h>
16 #include <linux/blk-mq.h>
17 #include <linux/nvme.h>
18 #include <linux/module.h>
19 #include <linux/parser.h>
21 #include "../host/nvme.h"
22 #include "../host/fabrics.h"
24 #define NVME_LOOP_MAX_SEGMENTS 256
27 * We handle AEN commands ourselves and don't even let the
28 * block layer know about them.
30 #define NVME_LOOP_NR_AEN_COMMANDS 1
31 #define NVME_LOOP_AQ_BLKMQ_DEPTH \
32 (NVME_AQ_DEPTH - NVME_LOOP_NR_AEN_COMMANDS)
34 struct nvme_loop_iod {
35 struct nvme_request nvme_req;
36 struct nvme_command cmd;
37 struct nvme_completion rsp;
39 struct nvme_loop_queue *queue;
40 struct work_struct work;
41 struct sg_table sg_table;
42 struct scatterlist first_sgl[];
45 struct nvme_loop_ctrl {
46 struct nvme_loop_queue *queues;
49 struct blk_mq_tag_set admin_tag_set;
51 struct list_head list;
53 struct blk_mq_tag_set tag_set;
54 struct nvme_loop_iod async_event_iod;
55 struct nvme_ctrl ctrl;
57 struct nvmet_ctrl *target_ctrl;
58 struct work_struct delete_work;
61 static inline struct nvme_loop_ctrl *to_loop_ctrl(struct nvme_ctrl *ctrl)
63 return container_of(ctrl, struct nvme_loop_ctrl, ctrl);
66 struct nvme_loop_queue {
67 struct nvmet_cq nvme_cq;
68 struct nvmet_sq nvme_sq;
69 struct nvme_loop_ctrl *ctrl;
72 static struct nvmet_port *nvmet_loop_port;
74 static LIST_HEAD(nvme_loop_ctrl_list);
75 static DEFINE_MUTEX(nvme_loop_ctrl_mutex);
77 static void nvme_loop_queue_response(struct nvmet_req *nvme_req);
78 static void nvme_loop_delete_ctrl(struct nvmet_ctrl *ctrl);
80 static struct nvmet_fabrics_ops nvme_loop_ops;
82 static inline int nvme_loop_queue_idx(struct nvme_loop_queue *queue)
84 return queue - queue->ctrl->queues;
87 static void nvme_loop_complete_rq(struct request *req)
89 struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req);
91 nvme_cleanup_cmd(req);
92 sg_free_table_chained(&iod->sg_table, true);
93 nvme_complete_rq(req);
96 static struct blk_mq_tags *nvme_loop_tagset(struct nvme_loop_queue *queue)
98 u32 queue_idx = nvme_loop_queue_idx(queue);
101 return queue->ctrl->admin_tag_set.tags[queue_idx];
102 return queue->ctrl->tag_set.tags[queue_idx - 1];
105 static void nvme_loop_queue_response(struct nvmet_req *req)
107 struct nvme_loop_queue *queue =
108 container_of(req->sq, struct nvme_loop_queue, nvme_sq);
109 struct nvme_completion *cqe = req->rsp;
112 * AEN requests are special as they don't time out and can
113 * survive any kind of queue freeze and often don't respond to
114 * aborts. We don't even bother to allocate a struct request
115 * for them but rather special case them here.
117 if (unlikely(nvme_loop_queue_idx(queue) == 0 &&
118 cqe->command_id >= NVME_LOOP_AQ_BLKMQ_DEPTH)) {
119 nvme_complete_async_event(&queue->ctrl->ctrl, cqe->status,
124 rq = blk_mq_tag_to_rq(nvme_loop_tagset(queue), cqe->command_id);
126 dev_err(queue->ctrl->ctrl.device,
127 "tag 0x%x on queue %d not found\n",
128 cqe->command_id, nvme_loop_queue_idx(queue));
132 nvme_end_request(rq, cqe->status, cqe->result);
136 static void nvme_loop_execute_work(struct work_struct *work)
138 struct nvme_loop_iod *iod =
139 container_of(work, struct nvme_loop_iod, work);
141 iod->req.execute(&iod->req);
144 static enum blk_eh_timer_return
145 nvme_loop_timeout(struct request *rq, bool reserved)
147 struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(rq);
149 /* queue error recovery */
150 nvme_reset_ctrl(&iod->queue->ctrl->ctrl);
152 /* fail with DNR on admin cmd timeout */
153 nvme_req(rq)->status = NVME_SC_ABORT_REQ | NVME_SC_DNR;
155 return BLK_EH_HANDLED;
158 static blk_status_t nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx,
159 const struct blk_mq_queue_data *bd)
161 struct nvme_ns *ns = hctx->queue->queuedata;
162 struct nvme_loop_queue *queue = hctx->driver_data;
163 struct request *req = bd->rq;
164 struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req);
167 ret = nvme_setup_cmd(ns, req, &iod->cmd);
171 iod->cmd.common.flags |= NVME_CMD_SGL_METABUF;
172 iod->req.port = nvmet_loop_port;
173 if (!nvmet_req_init(&iod->req, &queue->nvme_cq,
174 &queue->nvme_sq, &nvme_loop_ops)) {
175 nvme_cleanup_cmd(req);
176 blk_mq_start_request(req);
177 nvme_loop_queue_response(&iod->req);
181 if (blk_rq_bytes(req)) {
182 iod->sg_table.sgl = iod->first_sgl;
183 if (sg_alloc_table_chained(&iod->sg_table,
184 blk_rq_nr_phys_segments(req),
186 return BLK_STS_RESOURCE;
188 iod->req.sg = iod->sg_table.sgl;
189 iod->req.sg_cnt = blk_rq_map_sg(req->q, req, iod->sg_table.sgl);
192 blk_mq_start_request(req);
194 schedule_work(&iod->work);
198 static void nvme_loop_submit_async_event(struct nvme_ctrl *arg, int aer_idx)
200 struct nvme_loop_ctrl *ctrl = to_loop_ctrl(arg);
201 struct nvme_loop_queue *queue = &ctrl->queues[0];
202 struct nvme_loop_iod *iod = &ctrl->async_event_iod;
204 memset(&iod->cmd, 0, sizeof(iod->cmd));
205 iod->cmd.common.opcode = nvme_admin_async_event;
206 iod->cmd.common.command_id = NVME_LOOP_AQ_BLKMQ_DEPTH;
207 iod->cmd.common.flags |= NVME_CMD_SGL_METABUF;
209 if (!nvmet_req_init(&iod->req, &queue->nvme_cq, &queue->nvme_sq,
211 dev_err(ctrl->ctrl.device, "failed async event work\n");
215 schedule_work(&iod->work);
218 static int nvme_loop_init_iod(struct nvme_loop_ctrl *ctrl,
219 struct nvme_loop_iod *iod, unsigned int queue_idx)
221 iod->req.cmd = &iod->cmd;
222 iod->req.rsp = &iod->rsp;
223 iod->queue = &ctrl->queues[queue_idx];
224 INIT_WORK(&iod->work, nvme_loop_execute_work);
228 static int nvme_loop_init_request(struct blk_mq_tag_set *set,
229 struct request *req, unsigned int hctx_idx,
230 unsigned int numa_node)
232 struct nvme_loop_ctrl *ctrl = set->driver_data;
234 return nvme_loop_init_iod(ctrl, blk_mq_rq_to_pdu(req),
235 (set == &ctrl->tag_set) ? hctx_idx + 1 : 0);
238 static int nvme_loop_init_hctx(struct blk_mq_hw_ctx *hctx, void *data,
239 unsigned int hctx_idx)
241 struct nvme_loop_ctrl *ctrl = data;
242 struct nvme_loop_queue *queue = &ctrl->queues[hctx_idx + 1];
244 BUG_ON(hctx_idx >= ctrl->queue_count);
246 hctx->driver_data = queue;
250 static int nvme_loop_init_admin_hctx(struct blk_mq_hw_ctx *hctx, void *data,
251 unsigned int hctx_idx)
253 struct nvme_loop_ctrl *ctrl = data;
254 struct nvme_loop_queue *queue = &ctrl->queues[0];
256 BUG_ON(hctx_idx != 0);
258 hctx->driver_data = queue;
262 static const struct blk_mq_ops nvme_loop_mq_ops = {
263 .queue_rq = nvme_loop_queue_rq,
264 .complete = nvme_loop_complete_rq,
265 .init_request = nvme_loop_init_request,
266 .init_hctx = nvme_loop_init_hctx,
267 .timeout = nvme_loop_timeout,
270 static const struct blk_mq_ops nvme_loop_admin_mq_ops = {
271 .queue_rq = nvme_loop_queue_rq,
272 .complete = nvme_loop_complete_rq,
273 .init_request = nvme_loop_init_request,
274 .init_hctx = nvme_loop_init_admin_hctx,
275 .timeout = nvme_loop_timeout,
278 static void nvme_loop_destroy_admin_queue(struct nvme_loop_ctrl *ctrl)
280 nvmet_sq_destroy(&ctrl->queues[0].nvme_sq);
281 blk_cleanup_queue(ctrl->ctrl.admin_q);
282 blk_mq_free_tag_set(&ctrl->admin_tag_set);
285 static void nvme_loop_free_ctrl(struct nvme_ctrl *nctrl)
287 struct nvme_loop_ctrl *ctrl = to_loop_ctrl(nctrl);
289 if (list_empty(&ctrl->list))
292 mutex_lock(&nvme_loop_ctrl_mutex);
293 list_del(&ctrl->list);
294 mutex_unlock(&nvme_loop_ctrl_mutex);
297 blk_cleanup_queue(ctrl->ctrl.connect_q);
298 blk_mq_free_tag_set(&ctrl->tag_set);
301 nvmf_free_options(nctrl->opts);
306 static void nvme_loop_destroy_io_queues(struct nvme_loop_ctrl *ctrl)
310 for (i = 1; i < ctrl->queue_count; i++)
311 nvmet_sq_destroy(&ctrl->queues[i].nvme_sq);
314 static int nvme_loop_init_io_queues(struct nvme_loop_ctrl *ctrl)
316 struct nvmf_ctrl_options *opts = ctrl->ctrl.opts;
317 unsigned int nr_io_queues;
320 nr_io_queues = min(opts->nr_io_queues, num_online_cpus());
321 ret = nvme_set_queue_count(&ctrl->ctrl, &nr_io_queues);
322 if (ret || !nr_io_queues)
325 dev_info(ctrl->ctrl.device, "creating %d I/O queues.\n", nr_io_queues);
327 for (i = 1; i <= nr_io_queues; i++) {
328 ctrl->queues[i].ctrl = ctrl;
329 ret = nvmet_sq_init(&ctrl->queues[i].nvme_sq);
331 goto out_destroy_queues;
339 nvme_loop_destroy_io_queues(ctrl);
343 static int nvme_loop_connect_io_queues(struct nvme_loop_ctrl *ctrl)
347 for (i = 1; i < ctrl->queue_count; i++) {
348 ret = nvmf_connect_io_queue(&ctrl->ctrl, i);
356 static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl)
360 memset(&ctrl->admin_tag_set, 0, sizeof(ctrl->admin_tag_set));
361 ctrl->admin_tag_set.ops = &nvme_loop_admin_mq_ops;
362 ctrl->admin_tag_set.queue_depth = NVME_LOOP_AQ_BLKMQ_DEPTH;
363 ctrl->admin_tag_set.reserved_tags = 2; /* connect + keep-alive */
364 ctrl->admin_tag_set.numa_node = NUMA_NO_NODE;
365 ctrl->admin_tag_set.cmd_size = sizeof(struct nvme_loop_iod) +
366 SG_CHUNK_SIZE * sizeof(struct scatterlist);
367 ctrl->admin_tag_set.driver_data = ctrl;
368 ctrl->admin_tag_set.nr_hw_queues = 1;
369 ctrl->admin_tag_set.timeout = ADMIN_TIMEOUT;
371 ctrl->queues[0].ctrl = ctrl;
372 error = nvmet_sq_init(&ctrl->queues[0].nvme_sq);
375 ctrl->queue_count = 1;
377 error = blk_mq_alloc_tag_set(&ctrl->admin_tag_set);
381 ctrl->ctrl.admin_q = blk_mq_init_queue(&ctrl->admin_tag_set);
382 if (IS_ERR(ctrl->ctrl.admin_q)) {
383 error = PTR_ERR(ctrl->ctrl.admin_q);
384 goto out_free_tagset;
387 error = nvmf_connect_admin_queue(&ctrl->ctrl);
389 goto out_cleanup_queue;
391 error = nvmf_reg_read64(&ctrl->ctrl, NVME_REG_CAP, &ctrl->cap);
393 dev_err(ctrl->ctrl.device,
394 "prop_get NVME_REG_CAP failed\n");
395 goto out_cleanup_queue;
399 min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->ctrl.sqsize);
401 error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap);
403 goto out_cleanup_queue;
405 ctrl->ctrl.max_hw_sectors =
406 (NVME_LOOP_MAX_SEGMENTS - 1) << (PAGE_SHIFT - 9);
408 error = nvme_init_identify(&ctrl->ctrl);
410 goto out_cleanup_queue;
412 nvme_start_keep_alive(&ctrl->ctrl);
417 blk_cleanup_queue(ctrl->ctrl.admin_q);
419 blk_mq_free_tag_set(&ctrl->admin_tag_set);
421 nvmet_sq_destroy(&ctrl->queues[0].nvme_sq);
425 static void nvme_loop_shutdown_ctrl(struct nvme_loop_ctrl *ctrl)
427 nvme_stop_keep_alive(&ctrl->ctrl);
429 if (ctrl->queue_count > 1) {
430 nvme_stop_queues(&ctrl->ctrl);
431 blk_mq_tagset_busy_iter(&ctrl->tag_set,
432 nvme_cancel_request, &ctrl->ctrl);
433 nvme_loop_destroy_io_queues(ctrl);
436 if (ctrl->ctrl.state == NVME_CTRL_LIVE)
437 nvme_shutdown_ctrl(&ctrl->ctrl);
439 blk_mq_stop_hw_queues(ctrl->ctrl.admin_q);
440 blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
441 nvme_cancel_request, &ctrl->ctrl);
442 nvme_loop_destroy_admin_queue(ctrl);
445 static void nvme_loop_del_ctrl_work(struct work_struct *work)
447 struct nvme_loop_ctrl *ctrl = container_of(work,
448 struct nvme_loop_ctrl, delete_work);
450 nvme_uninit_ctrl(&ctrl->ctrl);
451 nvme_loop_shutdown_ctrl(ctrl);
452 nvme_put_ctrl(&ctrl->ctrl);
455 static int __nvme_loop_del_ctrl(struct nvme_loop_ctrl *ctrl)
457 if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_DELETING))
460 if (!queue_work(nvme_wq, &ctrl->delete_work))
466 static int nvme_loop_del_ctrl(struct nvme_ctrl *nctrl)
468 struct nvme_loop_ctrl *ctrl = to_loop_ctrl(nctrl);
471 ret = __nvme_loop_del_ctrl(ctrl);
475 flush_work(&ctrl->delete_work);
480 static void nvme_loop_delete_ctrl(struct nvmet_ctrl *nctrl)
482 struct nvme_loop_ctrl *ctrl;
484 mutex_lock(&nvme_loop_ctrl_mutex);
485 list_for_each_entry(ctrl, &nvme_loop_ctrl_list, list) {
486 if (ctrl->ctrl.cntlid == nctrl->cntlid)
487 __nvme_loop_del_ctrl(ctrl);
489 mutex_unlock(&nvme_loop_ctrl_mutex);
492 static void nvme_loop_reset_ctrl_work(struct work_struct *work)
494 struct nvme_loop_ctrl *ctrl =
495 container_of(work, struct nvme_loop_ctrl, ctrl.reset_work);
499 nvme_loop_shutdown_ctrl(ctrl);
501 ret = nvme_loop_configure_admin_queue(ctrl);
505 ret = nvme_loop_init_io_queues(ctrl);
507 goto out_destroy_admin;
509 ret = nvme_loop_connect_io_queues(ctrl);
513 changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
514 WARN_ON_ONCE(!changed);
516 nvme_queue_scan(&ctrl->ctrl);
517 nvme_queue_async_events(&ctrl->ctrl);
519 nvme_start_queues(&ctrl->ctrl);
524 nvme_loop_destroy_io_queues(ctrl);
526 nvme_loop_destroy_admin_queue(ctrl);
528 dev_warn(ctrl->ctrl.device, "Removing after reset failure\n");
529 nvme_uninit_ctrl(&ctrl->ctrl);
530 nvme_put_ctrl(&ctrl->ctrl);
533 static const struct nvme_ctrl_ops nvme_loop_ctrl_ops = {
535 .module = THIS_MODULE,
536 .flags = NVME_F_FABRICS,
537 .reg_read32 = nvmf_reg_read32,
538 .reg_read64 = nvmf_reg_read64,
539 .reg_write32 = nvmf_reg_write32,
540 .free_ctrl = nvme_loop_free_ctrl,
541 .submit_async_event = nvme_loop_submit_async_event,
542 .delete_ctrl = nvme_loop_del_ctrl,
543 .get_subsysnqn = nvmf_get_subsysnqn,
546 static int nvme_loop_create_io_queues(struct nvme_loop_ctrl *ctrl)
550 ret = nvme_loop_init_io_queues(ctrl);
554 memset(&ctrl->tag_set, 0, sizeof(ctrl->tag_set));
555 ctrl->tag_set.ops = &nvme_loop_mq_ops;
556 ctrl->tag_set.queue_depth = ctrl->ctrl.opts->queue_size;
557 ctrl->tag_set.reserved_tags = 1; /* fabric connect */
558 ctrl->tag_set.numa_node = NUMA_NO_NODE;
559 ctrl->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
560 ctrl->tag_set.cmd_size = sizeof(struct nvme_loop_iod) +
561 SG_CHUNK_SIZE * sizeof(struct scatterlist);
562 ctrl->tag_set.driver_data = ctrl;
563 ctrl->tag_set.nr_hw_queues = ctrl->queue_count - 1;
564 ctrl->tag_set.timeout = NVME_IO_TIMEOUT;
565 ctrl->ctrl.tagset = &ctrl->tag_set;
567 ret = blk_mq_alloc_tag_set(&ctrl->tag_set);
569 goto out_destroy_queues;
571 ctrl->ctrl.connect_q = blk_mq_init_queue(&ctrl->tag_set);
572 if (IS_ERR(ctrl->ctrl.connect_q)) {
573 ret = PTR_ERR(ctrl->ctrl.connect_q);
574 goto out_free_tagset;
577 ret = nvme_loop_connect_io_queues(ctrl);
579 goto out_cleanup_connect_q;
583 out_cleanup_connect_q:
584 blk_cleanup_queue(ctrl->ctrl.connect_q);
586 blk_mq_free_tag_set(&ctrl->tag_set);
588 nvme_loop_destroy_io_queues(ctrl);
592 static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev,
593 struct nvmf_ctrl_options *opts)
595 struct nvme_loop_ctrl *ctrl;
599 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
601 return ERR_PTR(-ENOMEM);
602 ctrl->ctrl.opts = opts;
603 INIT_LIST_HEAD(&ctrl->list);
605 INIT_WORK(&ctrl->delete_work, nvme_loop_del_ctrl_work);
606 INIT_WORK(&ctrl->ctrl.reset_work, nvme_loop_reset_ctrl_work);
608 ret = nvme_init_ctrl(&ctrl->ctrl, dev, &nvme_loop_ctrl_ops,
609 0 /* no quirks, we're perfect! */);
615 ctrl->ctrl.sqsize = opts->queue_size - 1;
616 ctrl->ctrl.kato = opts->kato;
618 ctrl->queues = kcalloc(opts->nr_io_queues + 1, sizeof(*ctrl->queues),
621 goto out_uninit_ctrl;
623 ret = nvme_loop_configure_admin_queue(ctrl);
625 goto out_free_queues;
627 if (opts->queue_size > ctrl->ctrl.maxcmd) {
628 /* warn if maxcmd is lower than queue_size */
629 dev_warn(ctrl->ctrl.device,
630 "queue_size %zu > ctrl maxcmd %u, clamping down\n",
631 opts->queue_size, ctrl->ctrl.maxcmd);
632 opts->queue_size = ctrl->ctrl.maxcmd;
635 if (opts->nr_io_queues) {
636 ret = nvme_loop_create_io_queues(ctrl);
638 goto out_remove_admin_queue;
641 nvme_loop_init_iod(ctrl, &ctrl->async_event_iod, 0);
643 dev_info(ctrl->ctrl.device,
644 "new ctrl: \"%s\"\n", ctrl->ctrl.opts->subsysnqn);
646 kref_get(&ctrl->ctrl.kref);
648 changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
649 WARN_ON_ONCE(!changed);
651 mutex_lock(&nvme_loop_ctrl_mutex);
652 list_add_tail(&ctrl->list, &nvme_loop_ctrl_list);
653 mutex_unlock(&nvme_loop_ctrl_mutex);
655 if (opts->nr_io_queues) {
656 nvme_queue_scan(&ctrl->ctrl);
657 nvme_queue_async_events(&ctrl->ctrl);
662 out_remove_admin_queue:
663 nvme_loop_destroy_admin_queue(ctrl);
667 nvme_uninit_ctrl(&ctrl->ctrl);
669 nvme_put_ctrl(&ctrl->ctrl);
675 static int nvme_loop_add_port(struct nvmet_port *port)
678 * XXX: disalow adding more than one port so
679 * there is no connection rejections when a
680 * a subsystem is assigned to a port for which
681 * loop doesn't have a pointer.
682 * This scenario would be possible if we allowed
683 * more than one port to be added and a subsystem
684 * was assigned to a port other than nvmet_loop_port.
690 nvmet_loop_port = port;
694 static void nvme_loop_remove_port(struct nvmet_port *port)
696 if (port == nvmet_loop_port)
697 nvmet_loop_port = NULL;
700 static struct nvmet_fabrics_ops nvme_loop_ops = {
701 .owner = THIS_MODULE,
702 .type = NVMF_TRTYPE_LOOP,
703 .add_port = nvme_loop_add_port,
704 .remove_port = nvme_loop_remove_port,
705 .queue_response = nvme_loop_queue_response,
706 .delete_ctrl = nvme_loop_delete_ctrl,
709 static struct nvmf_transport_ops nvme_loop_transport = {
711 .create_ctrl = nvme_loop_create_ctrl,
714 static int __init nvme_loop_init_module(void)
718 ret = nvmet_register_transport(&nvme_loop_ops);
722 ret = nvmf_register_transport(&nvme_loop_transport);
724 nvmet_unregister_transport(&nvme_loop_ops);
729 static void __exit nvme_loop_cleanup_module(void)
731 struct nvme_loop_ctrl *ctrl, *next;
733 nvmf_unregister_transport(&nvme_loop_transport);
734 nvmet_unregister_transport(&nvme_loop_ops);
736 mutex_lock(&nvme_loop_ctrl_mutex);
737 list_for_each_entry_safe(ctrl, next, &nvme_loop_ctrl_list, list)
738 __nvme_loop_del_ctrl(ctrl);
739 mutex_unlock(&nvme_loop_ctrl_mutex);
741 flush_workqueue(nvme_wq);
744 module_init(nvme_loop_init_module);
745 module_exit(nvme_loop_cleanup_module);
747 MODULE_LICENSE("GPL v2");
748 MODULE_ALIAS("nvmet-transport-254"); /* 254 == NVMF_TRTYPE_LOOP */