]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
dm flakey: Properly corrupt multi-page bios.
authorSweet Tea <sweettea@redhat.com>
Tue, 13 Nov 2018 13:04:24 +0000 (08:04 -0500)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:31 +0000 (14:21 -0300)
commitce9092019abab6f92a3c85c24a7ad80534377c6d
treed0706789a07b1ee8d34ceb62debd5c6477a3419d
parent03425de415bdc1ab6e6347a0f2edb157bafbbcc7
dm flakey: Properly corrupt multi-page bios.

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit a00f5276e26636cbf72f24f79831026d2e2868e7 ]

The flakey target is documented to be able to corrupt the Nth byte in
a bio, but does not corrupt byte indices after the first biovec in the
bio. Change the corrupting function to actually corrupt the Nth byte
no matter in which biovec that index falls.

A test device generating two-page bios, atop a flakey device configured
to corrupt a byte index on the second page, verified both the failure
to corrupt before this patch and the expected corruption after this
change.

Signed-off-by: John Dorminy <jdorminy@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/md/dm-flakey.c