Commit 1ef15fb
cifs: client: enforce consistent handling of multichannel and max_channels
Previously, the behavior of the multichannel and max_channels mount
options was inconsistent and order-dependent. For example, specifying
"multichannel,max_channels=1" would result in 2 channels, while
"max_channels=1,multichannel" would result in 1 channel. Additionally,
conflicting combinations such as "nomultichannel,max_channels=3" or
"multichannel,max_channels=1" did not produce errors and could lead to
unexpected channel counts.
This commit introduces two new fields in smb3_fs_context to explicitly
track whether multichannel and max_channels were specified during
mount. The option parsing and validation logic is updated to ensure:
- The outcome is no longer dependent on the order of options.
- Conflicting combinations (e.g., "nomultichannel,max_channels=3" or
"multichannel,max_channels=1") are detected and result in an error.
- The number of channels created is consistent with the specified
options.
This improves the reliability and predictability of mount option
handling for SMB3 multichannel support.
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Rajasi Mandal <rajasimandal@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 8697375 commit 1ef15fb
3 files changed
Lines changed: 50 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
1019 | | - | |
1020 | 1019 | | |
1021 | 1020 | | |
1022 | 1021 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
714 | 755 | | |
715 | 756 | | |
716 | 757 | | |
| |||
784 | 825 | | |
785 | 826 | | |
786 | 827 | | |
| 828 | + | |
787 | 829 | | |
788 | 830 | | |
789 | 831 | | |
| |||
1250 | 1292 | | |
1251 | 1293 | | |
1252 | 1294 | | |
1253 | | - | |
| 1295 | + | |
| 1296 | + | |
1254 | 1297 | | |
1255 | | - | |
1256 | | - | |
| 1298 | + | |
1257 | 1299 | | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | 1300 | | |
1263 | 1301 | | |
1264 | 1302 | | |
| |||
1394 | 1432 | | |
1395 | 1433 | | |
1396 | 1434 | | |
| 1435 | + | |
1397 | 1436 | | |
1398 | 1437 | | |
1399 | 1438 | | |
1400 | 1439 | | |
1401 | 1440 | | |
1402 | 1441 | | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | 1442 | | |
1407 | 1443 | | |
1408 | 1444 | | |
| |||
1820 | 1856 | | |
1821 | 1857 | | |
1822 | 1858 | | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
1826 | | - | |
1827 | | - | |
1828 | | - | |
1829 | | - | |
1830 | 1859 | | |
1831 | 1860 | | |
1832 | 1861 | | |
| |||
1913 | 1942 | | |
1914 | 1943 | | |
1915 | 1944 | | |
| 1945 | + | |
| 1946 | + | |
1916 | 1947 | | |
1917 | 1948 | | |
1918 | 1949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| |||
0 commit comments