]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm: preserve bi_io_vec when resubmitting bios
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 3 Apr 2009 17:45:25 +0000 (17:45 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:36:55 +0000 (10:36 -0700)
commit91cd4d9b40a51ca6318ee7314e9d9bb7de6be1ad
treeeb29d57646f9185775036635152ae30755cc5f8b
parentbab57a80d25db2240dee2fa68c2105ba59679e98
dm: preserve bi_io_vec when resubmitting bios

upstream commit: a920f6b3accc77d9dddbc98a7426be23ee479625

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: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/md/dm-bio-record.h