multipath.c (c6380ecd8e9bee7aba3d9a5a94b58168244c4a61) multipath.c (8b904b5b6b58b9a29dcf3f82d936d9e7fd69fda6)
1/*
2 * Copyright (c) 2017 Christoph Hellwig.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

--- 148 unchanged lines hidden (view full) ---

157 /*
158 * Add a multipath node if the subsystems supports multiple controllers.
159 * We also do this for private namespaces as the namespace sharing data could
160 * change after a rescan.
161 */
162 if (!(ctrl->subsys->cmic & (1 << 1)) || !multipath)
163 return 0;
164
1/*
2 * Copyright (c) 2017 Christoph Hellwig.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

--- 148 unchanged lines hidden (view full) ---

157 /*
158 * Add a multipath node if the subsystems supports multiple controllers.
159 * We also do this for private namespaces as the namespace sharing data could
160 * change after a rescan.
161 */
162 if (!(ctrl->subsys->cmic & (1 << 1)) || !multipath)
163 return 0;
164
165 q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE);
165 q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, NULL);
166 if (!q)
167 goto out;
168 q->queuedata = head;
169 blk_queue_make_request(q, nvme_ns_head_make_request);
170 q->poll_fn = nvme_ns_head_poll;
166 if (!q)
167 goto out;
168 q->queuedata = head;
169 blk_queue_make_request(q, nvme_ns_head_make_request);
170 q->poll_fn = nvme_ns_head_poll;
171 queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
171 blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
172 /* set to a default value for 512 until disk is validated */
173 blk_queue_logical_block_size(q, 512);
174
175 /* we need to propagate up the VMC settings */
176 if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
177 vwc = true;
178 blk_queue_write_cache(q, vwc, vwc);
179

--- 77 unchanged lines hidden ---
172 /* set to a default value for 512 until disk is validated */
173 blk_queue_logical_block_size(q, 512);
174
175 /* we need to propagate up the VMC settings */
176 if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
177 vwc = true;
178 blk_queue_write_cache(q, vwc, vwc);
179

--- 77 unchanged lines hidden ---