aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_in.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2022-01-18 08:04:44 +0100
committerJens Axboe <[email protected]>2022-01-18 06:34:05 -0700
commitfd9f4e62a39f09a7c014d7415c2b9d1390aa0504 (patch)
treeaef1b7d1c4a37ba8076ddf6ee349003960f383ab /net/lapb/lapb_in.c
parent850fd2abbe02eb2b52cbb1550adbcc89b36d65de (diff)
block: assign bi_bdev for cloned bios in blk_rq_prep_clone
bio_clone_fast() sets the cloned bio to have the same ->bi_bdev as the source bio. This means that when request-based dm called setup_clone(), the cloned bio had its ->bi_bdev pointing to the dm device. After Commit 0b6e522cdc4a ("blk-mq: use ->bi_bdev for I/O accounting") __blk_account_io_start() started using the request's ->bio->bi_bdev for I/O accounting, if it was set. This caused IO going to the underlying devices to use the dm device for their I/O accounting. Set up the proper ->bi_bdev in blk_rq_prep_clone based on the whole device bdev for the queue the request is cloned onto. Fixes: 0b6e522cdc4a ("blk-mq: use ->bi_bdev for I/O accounting") Reported-by: Benjamin Marzinski <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> [hch: the commit message is mostly from a different patch from Benjamin] Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions