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

Configure Feed

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

md: fix clearing of 'blocked' flag in the presence of bad blocks.

When the 'blocked' flag on a device is cleared while there are
unacknowledged bad blocks we must fail the device. This is needed for
backwards compatability of the interface.

The code currently uses the wrong test for "unacknowledged bad blocks
exist". Change it to the right test.

Signed-off-by: NeilBrown <neilb@suse.de>

NeilBrown 7da64a0a 1b6afa17

+1 -1
+1 -1
drivers/md/md.c
··· 2592 2592 err = 0; 2593 2593 } else if (cmd_match(buf, "-blocked")) { 2594 2594 if (!test_bit(Faulty, &rdev->flags) && 2595 - test_bit(BlockedBadBlocks, &rdev->flags)) { 2595 + rdev->badblocks.unacked_exist) { 2596 2596 /* metadata handler doesn't understand badblocks, 2597 2597 * so we need to fail the device 2598 2598 */