diff --git a/dist b/dist new file mode 100644 index 0000000000000000000000000000000000000000..5aa45c5bf3f5e5b781981aec176b4910ac39baaf --- /dev/null +++ b/dist @@ -0,0 +1 @@ +an8_8 diff --git a/xfsprogs-5.9.0-xfs-ignore-autofs-mount-table-entries.patch b/xfsprogs-5.9.0-xfs-ignore-autofs-mount-table-entries.patch new file mode 100644 index 0000000000000000000000000000000000000000..ec0e2fb8dbb8a890b448826e08ec1f03aa49b33b --- /dev/null +++ b/xfsprogs-5.9.0-xfs-ignore-autofs-mount-table-entries.patch @@ -0,0 +1,78 @@ +From 5ca4d781d36946de197ed2d4196c84c8f6b4522f Mon Sep 17 00:00:00 2001 +From: Ian Kent +Date: Mon, 12 Oct 2020 15:40:01 -0400 +Subject: [PATCH] xfsprogs: ignore autofs mount table entries + +Some of the xfsprogs utilities read the mount table via. getmntent(3). + +The mount table may contain (almost always these days since /etc/mtab is +symlinked to /proc/self/mounts) autofs mount entries. During processing +of the mount table entries statfs(2) can be called on mount point paths +which will trigger an automount if those entries are direct or offset +autofs mount triggers (indirect autofs mounts aren't affected). + +This can be a problem when there are a lot of autofs direct or offset +mounts because real mounts will be triggered when statfs(2) is called. +This can be particularly bad if the triggered mounts are NFS mounts and +the server is unavailable leading to lengthy boot times or worse. + +Simply ignoring autofs mount entries during getmentent(3) traversals +avoids the statfs() call that triggers these mounts. If there are +automounted mounts (real mounts) at the time of reading the mount table +these will still be seen in the list so they will be included if that +actually matters to the reader. + +Recent glibc getmntent(3) can ignore autofs mounts but that requires the +autofs user to configure autofs to use the "ignore" pseudo mount option +for autofs mounts. But this isn't yet the autofs default (to prevent +unexpected side effects) so that can't be used. + +The autofs direct and offset automount triggers are pseudo file system +mounts and are more or less useless in terms on file system information +so excluding them doesn't sacrifice useful file system information +either. + +Consequently excluding autofs mounts shouldn't have any adverse side +effects. + +Changes since v1: +- drop hunk from fsr/xfs_fsr.c. + +Signed-off-by: Ian Kent +Reviewed-by: Eric Sandeen +Signed-off-by: Eric Sandeen +Signed-off-by: Pavel Reichl +--- + libfrog/linux.c | 2 ++ + libfrog/paths.c | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/libfrog/linux.c b/libfrog/linux.c +index 40a839d1..a45d99ab 100644 +--- a/libfrog/linux.c ++++ b/libfrog/linux.c +@@ -73,6 +73,8 @@ platform_check_mount(char *name, char *block, struct stat *s, int flags) + * servers. So first, a simple check: does the "dev" start with "/" ? + */ + while ((mnt = getmntent(f)) != NULL) { ++ if (!strcmp(mnt->mnt_type, "autofs")) ++ continue; + if (mnt->mnt_fsname[0] != '/') + continue; + if (stat(mnt->mnt_dir, &mst) < 0) +diff --git a/libfrog/paths.c b/libfrog/paths.c +index 32737223..d6793764 100644 +--- a/libfrog/paths.c ++++ b/libfrog/paths.c +@@ -389,6 +389,8 @@ fs_table_initialise_mounts( + return errno; + + while ((mnt = getmntent(mtp)) != NULL) { ++ if (!strcmp(mnt->mnt_type, "autofs")) ++ continue; + if (!realpath(mnt->mnt_dir, rmnt_dir)) + continue; + if (!realpath(mnt->mnt_fsname, rmnt_fsname)) +-- +2.40.1 + diff --git a/xfsprogs.spec b/xfsprogs.spec index 1398298fcab45a6e2cf2183e99ba30a8bfc06028..0d81bedede1753cd0e0e2bdd8c163a084330c719 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,8 +1,8 @@ -%define anolis_release .0.6 +%define anolis_release .0.1 Summary: Utilities for managing the XFS filesystem Name: xfsprogs Version: 5.0.0 -Release: 10%{anolis_release}%{?dist} +Release: 11%{anolis_release}%{?dist} License: GPL+ and LGPLv2+ Group: System Environment/Base URL: https://xfs.wiki.kernel.org @@ -103,6 +103,7 @@ Patch59: xfsprogs-5.13.0-xfs-rename-struct-xfs_legacy_ictimestamp.patch Patch60: xfsprogs-5.11.0-mkfs-fix-wrong-inobtcount-usage-error-output.patch Patch61: xfsprogs-5.12.0-libxfs-expose-inobtcount-in-xfs-geometry.patch Patch62: xfsprogs-5.12.0-libfrog-report-inobtcount-in-geometry.patch +Patch63: xfsprogs-5.9.0-xfs-ignore-autofs-mount-table-entries.patch # Begin: Anolis customized patches # backport patch from upstream @@ -216,6 +217,7 @@ Doc pages for %{name}. %patch60 -p1 %patch61 -p1 %patch62 -p1 +%patch63 -p1 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 @@ -285,25 +287,18 @@ rm -rf $RPM_BUILD_ROOT/%{_mandir}/man8/xfs_scrub* %doc doc/CHANGES README %changelog -* Mon Apr 24 2023 Ferry Meng - 5.0.0-10.0.6 -- mkfs.xfs: terminate getsubopt arrays properly -- mkfs.xfs: fix internal logs' size -- xfs_repair: ignore empty xattr leaf blocks - -* Mon Nov 21 2022 Joseph Qi - 5.0.0-10.0.5 -- Add fsck log replay support - -* Sat Jul 16 2022 Hangbo Fan 5.0.0-10.0.4 -- Add doc sub package - -* Mon Jun 20 2022 Hongnan Li - 5.0.0-10.0.3 -- mkfs: don't trample the gid set in the protofile - -* Tue May 31 2022 Joseph Qi - 5.0.0-10.0.2 -- Add atomic write support - -* Tue Apr 19 2022 Weitao Zhou - 5.0.0-10.0.1 +* Thu Jul 27 2023 Weitao Zhou - 5.0.0-11.0.1 - Fix gcc10 -fno-common compile issue for compatible with gcc10 build +- Add atomic write support (joseph.qi@linux.aliabba.com) +- mkfs: don't trample the gid set in the protofile (hongnan.li@linux.alibaba.com) +- Add doc sub package (fanhangbo.fhb@alibaba-inc.com) +- Add fsck log replay support (joseph.qi@linux.aliabba.com) +- mkfs.xfs: terminate getsubopt arrays properly (mengferry@linux.alibaba.com) +- mkfs.xfs: fix internal logs' size (mengferry@linux.alibaba.com) +- xfs_repair: ignore empty xattr leaf blocks (mengferry@linux.alibaba.com) + +* Fri May 19 2023 Pavel Reichl - 5.0.0-11 +- Fix ignore autofs mount table entries (#2208391) * Thu Dec 09 2021 Bill O'Donnell 5.0.0-10 - xfsprogs: enable bigtime and inode btree counter features in RHEL8 (#2024201))