Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm-flakey: remove useless ERROR_READS check in flakey_end_io

If ERROR_READS is set, flakey_map returns DM_MAPIO_KILL for read
bios and flakey_end_io is never called, so there's no point in
checking it there. Also clean up an incorrect comment about when
read IOs are errored out.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

authored by

Benjamin Marzinski and committed by
Mikulas Patocka
4319f0aa 40ed054f

+2 -9
+2 -9
drivers/md/dm-flakey.c
··· 511 511 pb->bio_submitted = true; 512 512 513 513 /* 514 - * Error reads if neither corrupt_bio_byte or drop_writes or error_writes are set. 515 - * Otherwise, flakey_end_io() will decide if the reads should be modified. 514 + * If ERROR_READS isn't set flakey_end_io() will decide if the 515 + * reads should be modified. 516 516 */ 517 517 if (bio_data_dir(bio) == READ) { 518 518 if (test_bit(ERROR_READS, &fc->flags)) ··· 589 589 u32 rem = do_div(rnd, PROBABILITY_BASE); 590 590 if (rem < fc->random_read_corrupt) 591 591 corrupt_bio_random(bio); 592 - } 593 - if (test_bit(ERROR_READS, &fc->flags)) { 594 - /* 595 - * Error read during the down_interval if drop_writes 596 - * and error_writes were not configured. 597 - */ 598 - *error = BLK_STS_IOERR; 599 592 } 600 593 } 601 594