[PATCH 4/5] nvme: open-code __nvme_submit_sync_cmd()
Sagi Grimberg
sagi at grimberg.me
Mon Feb 13 02:07:09 PST 2023
>> - ret = __nvme_submit_sync_cmd(req, &res, buffer, buflen, 0);
>> + ret = blk_rq_map_kern(req->q, req, buffer, buflen, GFP_KERNEL);
>> + if (ret)
>> + goto out;
>> +
>> + ret = nvme_execute_rq(req, &res, false);
>
> This could use nvmf_submit_fabrics_cmd, which has nothing to with
> fabrics, but just is a variant of nvme_submit_sync_cmd that returns the
> result.
I think that the distinction is that it operates on the fabrics request
queue as well.
> So if we have that helper anyway we might as well move it to
> the core and turn nvme_submit_sync_cmd into a wrapper for it.
I was thinking the other way around, nvmf_submit_fabrics_cmd wraps
nvme_submit_sync_cmd with ctrl->fabrics_q, and we can add
More information about the Linux-nvme
mailing list