On Wed, Mar 3, 2021 at 8:52 PM Chaitanya Kulkarni <Chaitanya.Kulkarni@xxxxxxx> wrote: > > On 3/2/21 23:22, Kanchan Joshi wrote: > > -void nvme_execute_passthru_rq(struct request *rq) > > +void nvme_execute_passthru_rq_common(struct request *rq, > > + rq_end_io_fn *done) > > { > > struct nvme_command *cmd = nvme_req(rq)->cmd; > > struct nvme_ctrl *ctrl = nvme_req(rq)->ctrl; > > @@ -1135,9 +1136,17 @@ void nvme_execute_passthru_rq(struct request *rq) > > u32 effects; > > > > effects = nvme_passthru_start(ctrl, ns, cmd->common.opcode); > > - blk_execute_rq(disk, rq, 0); > > + if (!done) > > + blk_execute_rq(disk, rq, 0); > > + else > > + blk_execute_rq_nowait(disk, rq, 0, done); > > nvme_passthru_end(ctrl, effects); > > This needs a detailed explanation in order to prove the correctness. Do you see something wrong here? blk_execute_rq() employs the same helper (i.e. nowait one) and uses additional completion-variable to make it sync.