Commit d928466
committed
dm: handle failures in dm_table_set_restrictions
JIRA: https://issues.redhat.com/browse/RHEL-119009
Upstream Status: kernel/git/torvalds/linux.git
commit 4ea30ec
Author: Benjamin Marzinski <bmarzins@redhat.com>
Date: Thu Apr 10 15:49:40 2025 -0400
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>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>1 parent 9351e47 commit d928466
3 files changed
+36
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1833 | 1833 | | |
1834 | 1834 | | |
1835 | 1835 | | |
| 1836 | + | |
1836 | 1837 | | |
1837 | 1838 | | |
1838 | 1839 | | |
| |||
1859 | 1860 | | |
1860 | 1861 | | |
1861 | 1862 | | |
1862 | | - | |
| 1863 | + | |
1863 | 1864 | | |
1864 | | - | |
1865 | | - | |
1866 | | - | |
| 1865 | + | |
1867 | 1866 | | |
1868 | 1867 | | |
1869 | | - | |
1870 | | - | |
1871 | | - | |
1872 | 1868 | | |
1873 | 1869 | | |
1874 | 1870 | | |
| |||
1880 | 1876 | | |
1881 | 1877 | | |
1882 | 1878 | | |
1883 | | - | |
| 1879 | + | |
| 1880 | + | |
1884 | 1881 | | |
1885 | 1882 | | |
1886 | 1883 | | |
| |||
1891 | 1888 | | |
1892 | 1889 | | |
1893 | 1890 | | |
1894 | | - | |
| 1891 | + | |
| 1892 | + | |
1895 | 1893 | | |
| 1894 | + | |
1896 | 1895 | | |
1897 | 1896 | | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
1898 | 1906 | | |
1899 | 1907 | | |
1900 | 1908 | | |
| |||
| 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