* [PATCH] mount.cifs: ignore comment mount option
@ 2020-09-25 1:32 Martin Schwenke
2020-09-25 9:29 ` Aurélien Aptel
0 siblings, 1 reply; 3+ messages in thread
From: Martin Schwenke @ 2020-09-25 1:32 UTC (permalink / raw)
To: linux-cifs
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
mount.cifs currently complains about the "comment" option:
CIFS: Unknown mount option "comment=foo"
mount(8) on Linux says:
The command mount does not pass the mount options unbindable,
runbindable, private, rprivate, slave, rslave, shared, rshared,
auto, noauto, comment, x-*, loop, offset and sizelimit to the
mount.<suffix> helpers.
So if mount.cifs decides to re-read /etc/fstab it should ignore the
comment option.
A lot of online posts say to use comment=x-gvfs-show as an option to
have a Linux file manager display a mountpoint for a user mountable
filesystem. While the "comment=" part is superfluous when combined
with an x-* option, the problem is still difficult to debug.
Patch attached...
peace & happiness,
martin
[-- Attachment #2: 0001-mount.cifs-ignore-comment-mount-option.patch --]
[-- Type: text/x-patch, Size: 1448 bytes --]
From 97a071f7f1bf5274c027ee92fc0f6ca629ecdd65 Mon Sep 17 00:00:00 2001
From: Martin Schwenke <martin@meltin.net>
Date: Fri, 25 Sep 2020 11:16:39 +1000
Subject: [PATCH] mount.cifs: ignore comment mount option
mount.cifs currently complains about the "comment" option:
CIFS: Unknown mount option "comment=foo"
mount(8) on Linux says:
The command mount does not pass the mount options unbindable,
runbindable, private, rprivate, slave, rslave, shared, rshared,
auto, noauto, comment, x-*, loop, offset and sizelimit to the
mount.<suffix> helpers.
So if mount.cifs decides to re-read /etc/fstab it should ignore the
comment option.
A lot of online posts say to use comment=x-gvfs-show as an option to
have a Linux file manager display a mountpoint for a user mountable
filesystem. While the "comment=" part is superfluous when combined
with an x-* option, the problem is still difficult to debug.
Signed-off-by: Martin Schwenke <martin@meltin.net>
---
mount.cifs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mount.cifs.c b/mount.cifs.c
index 4feb397..5d43c00 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -777,6 +777,8 @@ static int parse_opt_token(const char *token)
return OPT_BKUPGID;
if (strcmp(token, "nofail") == 0)
return OPT_NOFAIL;
+ if (strcmp(token, "comment") == 0)
+ return OPT_IGNORE;
if (strncmp(token, "x-", 2) == 0)
return OPT_IGNORE;
if (strncmp(token, "snapshot", 8) == 0)
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mount.cifs: ignore comment mount option
2020-09-25 1:32 [PATCH] mount.cifs: ignore comment mount option Martin Schwenke
@ 2020-09-25 9:29 ` Aurélien Aptel
2020-11-09 23:46 ` Pavel Shilovsky
0 siblings, 1 reply; 3+ messages in thread
From: Aurélien Aptel @ 2020-09-25 9:29 UTC (permalink / raw)
To: Martin Schwenke, linux-cifs
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mount.cifs: ignore comment mount option
2020-09-25 9:29 ` Aurélien Aptel
@ 2020-11-09 23:46 ` Pavel Shilovsky
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Shilovsky @ 2020-11-09 23:46 UTC (permalink / raw)
To: Aurélien Aptel; +Cc: Martin Schwenke, linux-cifs
Merged. Thanks!
--
Best regards,
Pavel Shilovsky
пт, 25 сент. 2020 г. в 02:30, Aurélien Aptel <aaptel@suse.com>:
>
>
> Reviewed-by: Aurelien Aptel <aaptel@suse.com>
>
> Cheers,
> --
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
> SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
> GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-09 23:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 1:32 [PATCH] mount.cifs: ignore comment mount option Martin Schwenke
2020-09-25 9:29 ` Aurélien Aptel
2020-11-09 23:46 ` Pavel Shilovsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.