Skip to content
Commit 892ad71f authored by Dennis Zhou's avatar Dennis Zhou Committed by Jens Axboe
Browse files

dm: set the static flush bio device on demand



The next patch changes the macro bio_set_dev() to associate a bio with a
blkg based on the device set. However, dm creates a static bio to be
used as the basis for cloning empty flush bios on creation. The
bio_set_dev() call in alloc_dev() will cause problems with the next
patch adding association to bio_set_dev() because the call is before the
bdev is associated with a gendisk (bd_disk is %NULL). To get around
this, set the device on the static bio every time and use that to clone
to the other bios.

Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2268c0fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment