On 4/17/21 10:49 PM, Chaitanya Kulkarni wrote: > On 4/17/21 08:30, Jens Axboe wrote: >> + cmd->error = null_process_cmd(cmd, req_op(req), blk_rq_pos(req), >> + blk_rq_sectors(req)); > > How about following on the top of this patch ? > > diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c > index 8efaf21cc053..4c27e37ccc51 100644 > --- a/drivers/block/null_blk/main.c > +++ b/drivers/block/null_blk/main.c > @@ -1496,6 +1496,7 @@ static int null_map_queues(struct blk_mq_tag_set *set) > static int null_poll(struct blk_mq_hw_ctx *hctx) > { > struct nullb_queue *nq = hctx->driver_data; > + blk_status_t sts; > LIST_HEAD(list); > int nr = 0; > > @@ -1510,8 +1511,16 @@ static int null_poll(struct blk_mq_hw_ctx *hctx) > req = list_first_entry(&list, struct request, queuelist); > list_del_init(&req->queuelist); > cmd = blk_mq_rq_to_pdu(req); > - cmd->error = null_process_cmd(cmd, req_op(req), > blk_rq_pos(req), > - blk_rq_sectors(req)); > + if (cmd->nq->dev->zoned) > + sts = null_process_zoned_cmd(cmd, req_op(req), > + blk_rq_pos(req), > + blk_rq_sectors(req)); > + else > + sts = null_process_cmd(cmd, req_op(req), > blk_rq_pos(req), > + blk_rq_sectors(req)); > + > + cmd->error = sts; > + > nullb_complete_cmd(cmd); > nr++; > } > > If you are okay I can send a well tested patch with little bit code > cleanup once this is in the tree. Yes, that might be a good idea. I'll just fold it in, I've got it sitting separately so far. Just let me know when you've tested it. -- Jens Axboe