Commit acbbb12
committed
dm thin: resume even if in FAIL mode
Bugzilla: https://bugzilla.redhat.com/2162536
Upstream Status: kernel/git/torvalds/linux.git
commit 19eb165
Author: Luo Meng <luomeng12@huawei.com>
Date: Wed Nov 30 10:09:45 2022 +0800
dm thin: resume even if in FAIL mode
If a thinpool set fail_io while suspending, resume will fail with:
device-mapper: resume ioctl on vg-thinpool failed: Invalid argument
The thin-pool also can't be removed if an in-flight bio is in the
deferred list.
This can be easily reproduced using:
echo "offline" > /sys/block/sda/device/state
dd if=/dev/zero of=/dev/mapper/thin bs=4K count=1
dmsetup suspend /dev/mapper/pool
mkfs.ext4 /dev/mapper/thin
dmsetup resume /dev/mapper/pool
The root cause is maybe_resize_data_dev() will check fail_io and return
error before called dm_resume.
Fix this by adding FAIL mode check at the end of pool_preresume().
Cc: stable@vger.kernel.org
Fixes: da105ed ("dm thin metadata: introduce dm_pool_abort_metadata")
Signed-off-by: Luo Meng <luomeng12@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>1 parent 3eb6f26 commit acbbb12
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3542 | 3542 | | |
3543 | 3543 | | |
3544 | 3544 | | |
3545 | | - | |
| 3545 | + | |
3546 | 3546 | | |
3547 | 3547 | | |
3548 | 3548 | | |
3549 | | - | |
| 3549 | + | |
3550 | 3550 | | |
3551 | 3551 | | |
3552 | 3552 | | |
3553 | | - | |
| 3553 | + | |
3554 | 3554 | | |
3555 | 3555 | | |
3556 | 3556 | | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
3557 | 3565 | | |
3558 | | - | |
| 3566 | + | |
3559 | 3567 | | |
3560 | 3568 | | |
3561 | 3569 | | |
| |||
0 commit comments