Commit 892ad71
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: Dennis Zhou <dennis@kernel.org>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 2268c0f commit 892ad71
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2021 | 2021 | | |
2022 | 2022 | | |
2023 | 2023 | | |
| 2024 | + | |
2024 | 2025 | | |
2025 | 2026 | | |
2026 | 2027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
1420 | 1429 | | |
1421 | 1430 | | |
1422 | 1431 | | |
1423 | 1432 | | |
| 1433 | + | |
| 1434 | + | |
1424 | 1435 | | |
1425 | 1436 | | |
1426 | 1437 | | |
| |||
1939 | 1950 | | |
1940 | 1951 | | |
1941 | 1952 | | |
1942 | | - | |
1943 | 1953 | | |
1944 | 1954 | | |
1945 | 1955 | | |
| |||
0 commit comments