Commit 4ea30ec
dm: handle failures in dm_table_set_restrictions
If dm_table_set_restrictions() fails while swapping tables,
device-mapper will continue using the previous table. It must be sure to
leave the mapped_device in it's previous state on failure. Otherwise
device-mapper could end up using the old table with settings from the
unused table.
Do not update the mapped device in dm_set_zones_restrictions(). Wait
till after dm_table_set_restrictions() is sure to succeed to update the
md zoned settings. Do the same with the dax settings, and if
dm_revalidate_zones() fails, restore the original queue limits.
Fixes: 7f91ccd ("dm: Call dm_revalidate_zones() after setting the queue limits")
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Tested-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>1 parent e8819e7 commit 4ea30ec
3 files changed
+36
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1835 | 1835 | | |
1836 | 1836 | | |
1837 | 1837 | | |
| 1838 | + | |
1838 | 1839 | | |
1839 | 1840 | | |
1840 | 1841 | | |
| |||
1861 | 1862 | | |
1862 | 1863 | | |
1863 | 1864 | | |
1864 | | - | |
| 1865 | + | |
1865 | 1866 | | |
1866 | | - | |
1867 | | - | |
1868 | | - | |
| 1867 | + | |
1869 | 1868 | | |
1870 | 1869 | | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
1874 | 1870 | | |
1875 | 1871 | | |
1876 | 1872 | | |
| |||
1882 | 1878 | | |
1883 | 1879 | | |
1884 | 1880 | | |
1885 | | - | |
| 1881 | + | |
| 1882 | + | |
1886 | 1883 | | |
1887 | 1884 | | |
1888 | 1885 | | |
| |||
1893 | 1890 | | |
1894 | 1891 | | |
1895 | 1892 | | |
1896 | | - | |
| 1893 | + | |
| 1894 | + | |
1897 | 1895 | | |
| 1896 | + | |
1898 | 1897 | | |
1899 | 1898 | | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
1900 | 1908 | | |
1901 | 1909 | | |
1902 | 1910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 343 | + | |
347 | 344 | | |
348 | | - | |
349 | 345 | | |
350 | 346 | | |
351 | 347 | | |
| |||
383 | 379 | | |
384 | 380 | | |
385 | 381 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | 382 | | |
390 | 383 | | |
391 | 384 | | |
| |||
408 | 401 | | |
409 | 402 | | |
410 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
411 | 421 | | |
412 | 422 | | |
413 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
0 commit comments