mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 01:04:08 +08:00
- Fix 2 DM core bugs in the code that handles splitting "abnormal" IO
(discards, write same and secure erase) and issuing that IO to the correct underlying devices (and offsets within those devices). -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJfWUX4UqZ4x1O2wixSPxCi2dA1oFAmQl7tQACgkQxSPxCi2d A1rZ8ggA0MT7yLR2Bu2ZwyCXInkDdWH5cgQ5V9KqbOq80/8pMHQdxkuILej/mv6P I3YNzRXZMkYLDoXEN6ISd6P4D+FWxP++AqPcEk8rp4eiSvmxi+R7PYe4wPDTPaKT OAzwu1GmrJ88lUGAvfY9fNDuCApFubskasfIApUFFAQinuDPpo8fexmiiyNxPLIE MKPoRUzsDe34C6QLjlv4BJ0hHd+zYwnwCckSlekRYdiOR8Gx4VD1mK7z3Dm8xBpA ERCHbjCCSuz4FTyiLYJziIjZW/gY9u4N3H5w1njsnUCUmUs6/N3ETsO6qEfzeLVc Snxdmfp+UNQnpFLA5OHfTduvU8ufKw== =RpDD -----END PGP SIGNATURE----- Merge tag 'for-6.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix two DM core bugs in the code that handles splitting "abnormal" IO (discards, write same and secure erase) and issuing that IO to the correct underlying devices (and offsets within those devices). * tag 'for-6.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: fix __send_duplicate_bios() to always allow for splitting IO dm: fix improper splitting for abnormal bios
This commit is contained in:
commit
b527ac44eb
@ -1467,7 +1467,8 @@ static void setup_split_accounting(struct clone_info *ci, unsigned int len)
|
||||
}
|
||||
|
||||
static void alloc_multiple_bios(struct bio_list *blist, struct clone_info *ci,
|
||||
struct dm_target *ti, unsigned int num_bios)
|
||||
struct dm_target *ti, unsigned int num_bios,
|
||||
unsigned *len)
|
||||
{
|
||||
struct bio *bio;
|
||||
int try;
|
||||
@ -1478,7 +1479,7 @@ static void alloc_multiple_bios(struct bio_list *blist, struct clone_info *ci,
|
||||
if (try)
|
||||
mutex_lock(&ci->io->md->table_devices_lock);
|
||||
for (bio_nr = 0; bio_nr < num_bios; bio_nr++) {
|
||||
bio = alloc_tio(ci, ti, bio_nr, NULL,
|
||||
bio = alloc_tio(ci, ti, bio_nr, len,
|
||||
try ? GFP_NOIO : GFP_NOWAIT);
|
||||
if (!bio)
|
||||
break;
|
||||
@ -1513,8 +1514,10 @@ static int __send_duplicate_bios(struct clone_info *ci, struct dm_target *ti,
|
||||
ret = 1;
|
||||
break;
|
||||
default:
|
||||
if (len)
|
||||
setup_split_accounting(ci, *len);
|
||||
/* dm_accept_partial_bio() is not supported with shared tio->len_ptr */
|
||||
alloc_multiple_bios(&blist, ci, ti, num_bios);
|
||||
alloc_multiple_bios(&blist, ci, ti, num_bios, len);
|
||||
while ((clone = bio_list_pop(&blist))) {
|
||||
dm_tio_set_flag(clone_to_tio(clone), DM_TIO_IS_DUPLICATE_BIO);
|
||||
__map_bio(clone);
|
||||
|
Loading…
Reference in New Issue
Block a user