Libmount bug ?
Alan Huang <[email protected]>
| Newsgroups | org.kernel.vger.util-linux,org.kernel.vger.linux-bcachefs,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
Hello Karel,
The bcachefs has the helper called mount.bcachefs.
Currently, there are users using fstab with nofail/user fail to mount,
we would like to know whether other filesystems using similar helper
properly handle this.
This is like commit 06e05eb0f78566b68c44328c37d7c28d8655e9df
(“libmount: don't pass option "defaults" to helper")
Or would you like something like this? This might be incomplete though (e.g. owner, noowner etc.)
diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c
index d7569a0f0..c13b9ba19 100644
--- a/libmount/src/optmap.c
+++ b/libmount/src/optmap.c
@@ -152,11 +152,11 @@ static const struct libmnt_optmap userspace_opts_map[] =
{ "auto", MNT_MS_NOAUTO, MNT_NOHLPS | MNT_INVERT | MNT_NOMTAB }, /* Can be mounted using -a */
{ "noauto", MNT_MS_NOAUTO, MNT_NOHLPS | MNT_NOMTAB }, /* Can only be mounted explicitly */
- { "user[=]", MNT_MS_USER }, /* Allow ordinary user to mount (mtab) */
- { "nouser", MNT_MS_USER, MNT_INVERT | MNT_NOMTAB }, /* Forbid ordinary user to mount */
+ { "user[=]", MNT_MS_USER, MNT_NOHLPS}, /* Allow ordinary user to mount (mtab) */
+ { "nouser", MNT_MS_USER, MNT_INVERT | MNT_NOMTAB | MNT_NOHLPS}, /* Forbid ordinary user to mount */
- { "users", MNT_MS_USERS, MNT_NOMTAB }, /* Allow ordinary users to mount */
- { "nousers", MNT_MS_USERS, MNT_INVERT | MNT_NOMTAB }, /* Forbid ordinary users to mount */
+ { "users", MNT_MS_USERS, MNT_NOMTAB | MNT_NOHLPS}, /* Allow ordinary users to mount */
+ { "nousers", MNT_MS_USERS, MNT_INVERT | MNT_NOMTAB | MNT_NOHLPS}, /* Forbid ordinary users to mount */
{ "owner", MNT_MS_OWNER, MNT_NOMTAB }, /* Let the owner of the device mount */
{ "noowner", MNT_MS_OWNER, MNT_INVERT | MNT_NOMTAB }, /* Device owner has no special privs */
@@ -180,7 +180,7 @@ static const struct libmnt_optmap userspace_opts_map[] =
{ "sizelimit=", MNT_MS_SIZELIMIT, MNT_NOHLPS | MNT_NOMTAB }, /* loop device size limit */
{ "encryption=", MNT_MS_ENCRYPTION, MNT_NOHLPS | MNT_NOMTAB }, /* loop device encryption */
- { "nofail", MNT_MS_NOFAIL, MNT_NOMTAB }, /* Do not fail if ENOENT on dev */
+ { "nofail", MNT_MS_NOFAIL, MNT_NOMTAB | MNT_NOHLPS}, /* Do not fail if ENOENT on dev */
{ "uhelper=", MNT_MS_UHELPER }, /* /sbin/umount.<helper> */
Thanks,
Alan