Skip to content

Commit

Permalink
dm: remove useless code from dm_dispatch_clone_request
Browse files Browse the repository at this point in the history
Both ->start_time_ns and the RQF_IO_STAT are set when the request is
allocated using blk_mq_alloc_request by dm-mpath in blk_mq_rq_ctx_init.
The block layer also ensures ->start_time_ns is only set when actually
needed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Link: https://lore.kernel.org/r/20220215100540.3892965-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Feb 17, 2022
1 parent 28db471 commit 8803c89
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/md/dm-rq.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,6 @@ static blk_status_t dm_dispatch_clone_request(struct request *clone, struct requ
{
blk_status_t r;

if (blk_queue_io_stat(clone->q))
clone->rq_flags |= RQF_IO_STAT;

clone->start_time_ns = ktime_get_ns();
r = blk_insert_cloned_request(clone);
if (r != BLK_STS_OK && r != BLK_STS_RESOURCE && r != BLK_STS_DEV_RESOURCE)
/* must complete clone in terms of original request */
Expand Down

0 comments on commit 8803c89

Please sign in to comment.