diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2025-04-22 19:47:38 -0400 |
---|---|---|
committer | Mikulas Patocka <mpatocka@redhat.com> | 2025-05-04 11:35:05 +0200 |
commit | 13e79076c89f6e96a6cca8f6df38b40d025907b4 (patch) | |
tree | 763c48dbb090619c6df3fbd62dee31c5947c5451 /scripts/lib/kdoc/kdoc_files.py | |
parent | 4319f0aaa2354f14037f04456ed635983b379695 (diff) |
dm-flakey: make corrupting read bios work
dm-flakey corrupts the read bios in the endio function. However, the
corrupt_bio_* functions checked bio_has_data() to see if there was data
to corrupt. Since this was the endio function, there was no data left to
complete, so bio_has_data() was always false. Fix this by saving a copy
of the bio's bi_iter in flakey_map(), and using this to initialize the
iter for corrupting the read bios. This patch also skips cloning the bio
for write bios with no data.
Reported-by: Kent Overstreet <kent.overstreet@linux.dev>
Fixes: a3998799fb4df ("dm flakey: add corrupt_bio_byte feature")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions