multipath.c (b3c9a04135bdbd3aabd5e9534bad0fe6df505f8a) | multipath.c (5f27571382ca42daa3e3d40d1b252bf18c2b61d2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2017-2018 Christoph Hellwig. 4 */ 5 6#include <linux/backing-dev.h> 7#include <linux/moduleparam.h> 8#include <linux/vmalloc.h> --- 109 unchanged lines hidden (view full) --- 118{ 119 struct nvme_ns *ns = rq->q->queuedata; 120 struct gendisk *disk = ns->head->disk; 121 122 if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq)) 123 return; 124 125 nvme_req(rq)->flags |= NVME_MPATH_IO_STATS; | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2017-2018 Christoph Hellwig. 4 */ 5 6#include <linux/backing-dev.h> 7#include <linux/moduleparam.h> 8#include <linux/vmalloc.h> --- 109 unchanged lines hidden (view full) --- 118{ 119 struct nvme_ns *ns = rq->q->queuedata; 120 struct gendisk *disk = ns->head->disk; 121 122 if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq)) 123 return; 124 125 nvme_req(rq)->flags |= NVME_MPATH_IO_STATS; |
126 nvme_req(rq)->start_time = bdev_start_io_acct(disk->part0, 127 blk_rq_bytes(rq) >> SECTOR_SHIFT, 128 req_op(rq), jiffies); | 126 nvme_req(rq)->start_time = bdev_start_io_acct(disk->part0, req_op(rq), 127 jiffies); |
129} 130EXPORT_SYMBOL_GPL(nvme_mpath_start_request); 131 132void nvme_mpath_end_request(struct request *rq) 133{ 134 struct nvme_ns *ns = rq->q->queuedata; 135 136 if (!(nvme_req(rq)->flags & NVME_MPATH_IO_STATS)) 137 return; 138 bdev_end_io_acct(ns->head->disk->part0, req_op(rq), | 128} 129EXPORT_SYMBOL_GPL(nvme_mpath_start_request); 130 131void nvme_mpath_end_request(struct request *rq) 132{ 133 struct nvme_ns *ns = rq->q->queuedata; 134 135 if (!(nvme_req(rq)->flags & NVME_MPATH_IO_STATS)) 136 return; 137 bdev_end_io_acct(ns->head->disk->part0, req_op(rq), |
139 nvme_req(rq)->start_time); | 138 blk_rq_bytes(rq) >> SECTOR_SHIFT, 139 nvme_req(rq)->start_time); |
140} 141 142void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl) 143{ 144 struct nvme_ns *ns; 145 146 down_read(&ctrl->namespaces_rwsem); 147 list_for_each_entry(ns, &ctrl->namespaces, list) { --- 810 unchanged lines hidden --- | 140} 141 142void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl) 143{ 144 struct nvme_ns *ns; 145 146 down_read(&ctrl->namespaces_rwsem); 147 list_for_each_entry(ns, &ctrl->namespaces, list) { --- 810 unchanged lines hidden --- |