Commit 91c2daf
committed
Revert "dm: requeue IO if mapping table not yet available"
JIRA: https://issues.redhat.com/browse/RHEL-59523
Upstream Status: kernel/git/torvalds/linux.git
commit c8691cd
Author: Mikulas Patocka <mpatocka@redhat.com>
Date: Fri Sep 13 15:05:18 2024 +0200
Revert "dm: requeue IO if mapping table not yet available"
This reverts commit fa24708.
The following sequence of commands causes a livelock - there will be
workqueue process looping and consuming 100% CPU:
dmsetup create --notable test
truncate -s 1MiB testdata
losetup /dev/loop0 testdata
dmsetup load test --table '0 2048 linear /dev/loop0 0'
dd if=/dev/zero of=/dev/dm-0 bs=16k count=1 conv=fdatasync
The livelock is caused by the commit fa24708. The commit claims that
it fixes a race condition, however, it is unknown what the actual race
condition is and what program is involved in the race condition.
When the inactive table is loaded, the nodes /dev/dm-0 and
/sys/block/dm-0 are created. /dev/dm-0 has zero size at this point. When
the device is suspended and resumed, the nodes /dev/mapper/test and
/dev/disk/* are created.
If some program opens a block device before it is created by dmsetup or
lvm, the program is buggy, so dm could just report an error as it used to
do before.
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: fa24708 ("dm: requeue IO if mapping table not yet available")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>1 parent 60f71f2 commit 91c2daf
2 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
499 | 501 | | |
500 | | - | |
| 502 | + | |
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2030 | 2030 | | |
2031 | 2031 | | |
2032 | 2032 | | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
2033 | 2039 | | |
2034 | | - | |
2035 | | - | |
2036 | | - | |
| 2040 | + | |
| 2041 | + | |
2037 | 2042 | | |
2038 | 2043 | | |
2039 | 2044 | | |
| |||
0 commit comments