Commit be4addb
dm: Fix deadlock when reloading a multipath table
Request-based devices (dm-multipath) queue I/O in blk-mq on noflush
suspends. Any queued IO will make it impossible to freeze the queue. If
a process attempts to update the queue limits while there is queued IO,
it can be get stuck holding the limits lock, while unable to freeze the
queue. If device-mapper then attempts to update the limits during a
table swap, it will deadlock trying to grab the limits lock while making
it impossible to flush the IO.
Disallow updating the queue limits during a table swap, when updating an
immutable request-based dm device (dm-multipath) during a noflush
suspend. It is userspace's responsibility to make sure that the new
table uses the same limits as the existing table if it asks for a
noflush suspend.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>1 parent 4929ba5 commit be4addb
3 files changed
Lines changed: 29 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2043 | 2043 | | |
2044 | 2044 | | |
2045 | 2045 | | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
2046 | 2050 | | |
2047 | 2051 | | |
2048 | 2052 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4383 | 4383 | | |
4384 | 4384 | | |
4385 | 4385 | | |
4386 | | - | |
4387 | | - | |
4388 | | - | |
4389 | | - | |
4390 | | - | |
| 4386 | + | |
| 4387 | + | |
4391 | 4388 | | |
4392 | 4389 | | |
4393 | 4390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2439 | 2439 | | |
2440 | 2440 | | |
2441 | 2441 | | |
2442 | | - | |
2443 | 2442 | | |
2444 | 2443 | | |
2445 | 2444 | | |
| |||
2454 | 2453 | | |
2455 | 2454 | | |
2456 | 2455 | | |
2457 | | - | |
2458 | | - | |
2459 | | - | |
2460 | | - | |
2461 | | - | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
2462 | 2463 | | |
2463 | 2464 | | |
2464 | 2465 | | |
| |||
2836 | 2837 | | |
2837 | 2838 | | |
2838 | 2839 | | |
| 2840 | + | |
2839 | 2841 | | |
2840 | 2842 | | |
2841 | 2843 | | |
| |||
2848 | 2850 | | |
2849 | 2851 | | |
2850 | 2852 | | |
| 2853 | + | |
2851 | 2854 | | |
2852 | 2855 | | |
2853 | 2856 | | |
| |||
2856 | 2859 | | |
2857 | 2860 | | |
2858 | 2861 | | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
2859 | 2873 | | |
2860 | 2874 | | |
2861 | 2875 | | |
2862 | 2876 | | |
2863 | 2877 | | |
2864 | 2878 | | |
2865 | | - | |
| 2879 | + | |
2866 | 2880 | | |
2867 | 2881 | | |
2868 | 2882 | | |
2869 | 2883 | | |
2870 | 2884 | | |
2871 | 2885 | | |
2872 | | - | |
| 2886 | + | |
2873 | 2887 | | |
2874 | 2888 | | |
2875 | 2889 | | |
2876 | 2890 | | |
2877 | 2891 | | |
2878 | 2892 | | |
2879 | 2893 | | |
2880 | | - | |
| 2894 | + | |
2881 | 2895 | | |
2882 | 2896 | | |
2883 | 2897 | | |
| |||
2930 | 2944 | | |
2931 | 2945 | | |
2932 | 2946 | | |
2933 | | - | |
2934 | 2947 | | |
2935 | 2948 | | |
2936 | 2949 | | |
| |||
2993 | 3006 | | |
2994 | 3007 | | |
2995 | 3008 | | |
2996 | | - | |
2997 | | - | |
2998 | 3009 | | |
2999 | 3010 | | |
3000 | 3011 | | |
| |||
0 commit comments