- add additional fixes for the amd nounmount option support (RHEL-150237).
This commit is contained in:
parent
7f03cb7b09
commit
52ace32355
@ -0,0 +1,41 @@
|
||||
autofs-5.1.9 - fix incorrect flags update in update_with_defaults()
|
||||
|
||||
From: Ian Kent <raven@themaw.net>
|
||||
|
||||
After adding support for some additional am-utils map entry options at
|
||||
least one of them, "nounmount", and probably others don't work in some
|
||||
cases.
|
||||
|
||||
This is because some of them are is implemented using a flag in the map
|
||||
entry which was incorrectly being cleared during updating the entry with
|
||||
current defaults.
|
||||
|
||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
||||
---
|
||||
CHANGELOG | 1 +
|
||||
modules/parse_amd.c | 4 +++-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- autofs-5.1.7.orig/CHANGELOG
|
||||
+++ autofs-5.1.7/CHANGELOG
|
||||
@@ -197,6 +197,7 @@
|
||||
- fix stale direct mount trigger not umounted on expire.
|
||||
- add function table_lookup_ino().
|
||||
- improve handling of missing map entry for mount request.
|
||||
+- fix incorrect flags update in update_with_defaults().
|
||||
|
||||
25/01/2021 autofs-5.1.7
|
||||
- make bind mounts propagation slave by default.
|
||||
--- autofs-5.1.7.orig/modules/parse_amd.c
|
||||
+++ autofs-5.1.7/modules/parse_amd.c
|
||||
@@ -654,7 +654,9 @@ static void update_with_defaults(struct
|
||||
if (deftype != AMD_MOUNT_TYPE_NONE)
|
||||
entry->flags |= (defaults->flags & AMD_MOUNT_TYPE_MASK);
|
||||
else {
|
||||
- entry->flags = AMD_MOUNT_TYPE_NFS;
|
||||
+ unsigned long per_mnt_flags = entry->flags & AMD_MOUNT_OPT_MASK;
|
||||
+
|
||||
+ entry->flags = AMD_MOUNT_TYPE_NFS | per_mnt_flags;
|
||||
tmp = strdup("nfs");
|
||||
if (tmp)
|
||||
entry->type = tmp;
|
||||
@ -0,0 +1,36 @@
|
||||
autofs-5.1.9 - skip expire check for amd nounmount mounts
|
||||
|
||||
From: Ian Kent <raven@themaw.net>
|
||||
|
||||
There's no need to check amd mounts with the "nounmount" option set.
|
||||
|
||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
||||
---
|
||||
CHANGELOG | 1 +
|
||||
daemon/indirect.c | 5 +++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- autofs-5.1.7.orig/CHANGELOG
|
||||
+++ autofs-5.1.7/CHANGELOG
|
||||
@@ -198,6 +198,7 @@
|
||||
- add function table_lookup_ino().
|
||||
- improve handling of missing map entry for mount request.
|
||||
- fix incorrect flags update in update_with_defaults().
|
||||
+- skip expire check for amd nounmount mounts.
|
||||
|
||||
25/01/2021 autofs-5.1.7
|
||||
- make bind mounts propagation slave by default.
|
||||
--- autofs-5.1.7.orig/daemon/indirect.c
|
||||
+++ autofs-5.1.7/daemon/indirect.c
|
||||
@@ -377,6 +377,11 @@ void *expire_proc_indirect(void *arg)
|
||||
char *ind_key;
|
||||
int ret;
|
||||
|
||||
+ /* No need to check "nounmount" amd mounts */
|
||||
+ if (mnt->flags & MNTS_AMD_MOUNT &&
|
||||
+ mnt->amd_flags & AMD_MOUNT_OPT_NOUNMOUNT)
|
||||
+ continue;
|
||||
+
|
||||
if (mnt->flags & (MNTS_AUTOFS|MNTS_OFFSET)) {
|
||||
/*
|
||||
* If we have submounts check if this path lives below
|
||||
15
autofs.spec
15
autofs.spec
@ -12,7 +12,7 @@
|
||||
Summary: A tool for automatically mounting and unmounting filesystems
|
||||
Name: autofs
|
||||
Version: 5.1.7
|
||||
Release: 66%{?dist}
|
||||
Release: 67%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}-2.tar.gz
|
||||
@ -246,6 +246,10 @@ Patch222: autofs-5.1.9-fix-stale-direct-mount-trigger-not-umounted-on-expire.pat
|
||||
Patch223: autofs-5.1.9-add-function-table_lookup_ino.patch
|
||||
Patch224: autofs-5.1.9-improve-handling-of-missing-map-entry-for-mount-request.patch
|
||||
|
||||
# JIRA: RHEL-150237
|
||||
Patch225: autofs-5.1.9-fix-incorrect-flags-update-in-update_with_defaults.patch
|
||||
Patch226: autofs-5.1.9-skip-expire-check-for-amd-nounmount-mounts.patch
|
||||
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd-units
|
||||
BuildRequires: systemd-devel
|
||||
@ -521,6 +525,9 @@ echo %{version}-%{release} > .version
|
||||
%patch -P 223 -p1
|
||||
%patch -P 224 -p1
|
||||
|
||||
%patch -P 225 -p1
|
||||
%patch -P 226 -p1
|
||||
|
||||
%build
|
||||
LDFLAGS=-Wl,-z,now
|
||||
%configure \
|
||||
@ -628,6 +635,12 @@ fi
|
||||
%dir /etc/auto.master.d
|
||||
|
||||
%changelog
|
||||
* Wed Mar 09 2026 Ian Kent <ikent@redhat.com> - 1:5.1.7-67
|
||||
- RHEL-150237 - RFE: autofs: add handling for AMD 'nounmount' option [rhel-9]
|
||||
- fix incorrect flags update in update_with_defaults().
|
||||
- skip expire check for amd nounmount mounts.
|
||||
- Resolves: RHEL-150237
|
||||
|
||||
* Wed Mar 04 2026 Ian Kent <ikent@redhat.com> - 1:5.1.7-66
|
||||
- RHEL-113623 - Wrong oz_pgrp in autofs_sb_info causes automount to wait
|
||||
on automount.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user