Bug 463637 - Unknown parameter 'nolock'
Summary: Unknown parameter 'nolock'
Status: RESOLVED FIXED
Alias: None
Product: Smb4k
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Reinholdt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-30 19:55 UTC by mi.selber
Modified: 2023-01-04 09:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mi.selber 2022-12-30 19:55:42 UTC
SUMMARY

If the option "Smb4KMountSettings::noLocking" in the settings menu of smb4K was enabled, mounting will not work in Ubuntu.
Cifs will abort with error: "cifs: Unknown parameter 'nolock'"
Smb4k will set the 'nolock' mount option which is an alias of 'nobrl' and has probably been removed (see comment 4 in https://bugzilla.redhat.com/show_bug.cgi?id=1944015)

STEPS TO REPRODUCE
1. Open smb4k
2. open settings > Mounting (left side) [Einhängen] > Select 3rd Tab "additional settings..." (on top) ["Erweiterte Einstellungen zum Einhängen"] 
3. enable option "Use no locking"
4. try to mount some smb network storage

OBSERVED RESULT

- directory will not be mounted
- dmesg will show "cifs: Unknown parameter 'nolock'"

EXPECTED RESULT

- mounted directory with disabled Byte-Range Lock

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 22.10
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.6

Kernel: 5.19.0-26-generic
Cifs version: cifs-utils 2:6.14-1.1

ADDITIONAL INFORMATION

The solution will likely be to change the following:

file: core/smb4kmounter.cpp
line: 1222
change: argumentsList << QStringLiteral("nolock");
to: argumentsList << QStringLiteral("nobrl");
Comment 1 Alexander Reinholdt 2023-01-04 09:36:27 UTC
Git commit 1089ec4d39e6025aa33447434ad02af074d484be by Alexander Reinholdt.
Committed on 04/01/2023 at 09:36.
Pushed by areinholdt into branch 'master'.

Fix problems with using 'nolock' option with mount.cifs.

M  +1    -1    core/smb4kmounter.cpp
M  +2    -2    core/smb4kmountsettings_linux.kcfg
M  +2    -2    doc/index.docbook

https://invent.kde.org/network/smb4k/commit/1089ec4d39e6025aa33447434ad02af074d484be
Comment 2 Alexander Reinholdt 2023-01-04 09:38:03 UTC
Git commit c7b2619048205d6e9424d46cfe42054e3f4d8485 by Alexander Reinholdt.
Committed on 04/01/2023 at 09:37.
Pushed by areinholdt into branch '3.1'.

Fix problems with the 'nolock' option for mount.cifs.

M  +1    -1    core/smb4kmounter.cpp

https://invent.kde.org/network/smb4k/commit/c7b2619048205d6e9424d46cfe42054e3f4d8485