[PATCH] nvme-multipath: introduce service-time iopolicy
Keith Busch
kbusch at kernel.org
Wed Nov 6 08:07:46 PST 2024
On Wed, Nov 06, 2024 at 06:34:10PM +0800, Guixin Liu wrote:
> + if (READ_ONCE(ns->head->subsys->iopolicy) == NVME_IOPOLICY_ST) {
> + atomic_add(blk_rq_bytes(rq), &ns->ctrl->inflight_size);
> + nvme_req(rq)->flags |= NVME_MPATH_CNT_IOSIZE;
> + }
...
> static inline struct nvme_request *nvme_req(struct request *req)
> @@ -367,6 +368,7 @@ struct nvme_ctrl {
> struct timer_list anatt_timer;
> struct work_struct ana_work;
> atomic_t nr_active;
> + atomic_t inflight_size;
You're counting bytes, so this should probably be an atomic64_t.
More information about the Linux-nvme
mailing list