• Mikulas Patocka's avatar
    dm: preserve bi_io_vec when resubmitting bios · a920f6b3
    Mikulas Patocka authored
    Device mapper saves and restores various fields in the bio, but it doesn't save
    bi_io_vec.  If the device driver modifies this after a partially successful
    request, dm-raid1 and dm-multipath may attempt to resubmit a bio that has
    bi_size inconsistent with the size of vector.
    
    To make requests resubmittable in dm-raid1 and dm-multipath, we must save
    and restore the bio vector as well.
    
    To reduce the memory overhead involved in this, we do not save the pages in a
    vector and use a 16-bit field size if the page size is less than 65536.
    
    Cc: stable@kernel.org
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    a920f6b3
dm-bio-record.h 1.59 KB