* FAILED: patch "[PATCH] xfs: always warn about deprecated mount options" failed to apply to 6.12-stable tree
@ 2025-10-26 14:37 gregkh
2025-10-26 18:04 ` [PATCH 6.12.y] xfs: always warn about deprecated mount options Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2025-10-26 14:37 UTC (permalink / raw)
To: djwong, cem, cmaiolino, hch; +Cc: stable
The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 630785bfbe12c3ee3ebccd8b530a98d632b7e39d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025102645-oblivion-whoopee-576c@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 630785bfbe12c3ee3ebccd8b530a98d632b7e39d Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <djwong@kernel.org>
Date: Tue, 21 Oct 2025 11:30:12 -0700
Subject: [PATCH] xfs: always warn about deprecated mount options
The deprecation of the 'attr2' mount option in 6.18 wasn't entirely
successful because nobody noticed that the kernel never printed a
warning about attr2 being set in fstab if the only xfs filesystem is the
root fs; the initramfs mounts the root fs with no mount options; and the
init scripts only conveyed the fstab options by remounting the root fs.
Fix this by making it complain all the time.
Cc: stable@vger.kernel.org # v5.13
Fixes: 92cf7d36384b99 ("xfs: Skip repetitive warnings about mount options")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 9d51186b24dd..c53f2edf92e7 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1379,16 +1379,25 @@ suffix_kstrtoull(
static inline void
xfs_fs_warn_deprecated(
struct fs_context *fc,
- struct fs_parameter *param,
- uint64_t flag,
- bool value)
+ struct fs_parameter *param)
{
- /* Don't print the warning if reconfiguring and current mount point
- * already had the flag set
+ /*
+ * Always warn about someone passing in a deprecated mount option.
+ * Previously we wouldn't print the warning if we were reconfiguring
+ * and current mount point already had the flag set, but that was not
+ * the right thing to do.
+ *
+ * Many distributions mount the root filesystem with no options in the
+ * initramfs and rely on mount -a to remount the root fs with the
+ * options in fstab. However, the old behavior meant that there would
+ * never be a warning about deprecated mount options for the root fs in
+ * /etc/fstab. On a single-fs system, that means no warning at all.
+ *
+ * Compounding this problem are distribution scripts that copy
+ * /proc/mounts to fstab, which means that we can't remove mount
+ * options unless we're 100% sure they have only ever been advertised
+ * in /proc/mounts in response to explicitly provided mount options.
*/
- if ((fc->purpose & FS_CONTEXT_FOR_RECONFIGURE) &&
- !!(XFS_M(fc->root->d_sb)->m_features & flag) == value)
- return;
xfs_warn(fc->s_fs_info, "%s mount option is deprecated.", param->key);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 6.12.y] xfs: always warn about deprecated mount options 2025-10-26 14:37 FAILED: patch "[PATCH] xfs: always warn about deprecated mount options" failed to apply to 6.12-stable tree gregkh @ 2025-10-26 18:04 ` Sasha Levin 2025-10-27 16:19 ` Darrick J. Wong 0 siblings, 1 reply; 3+ messages in thread From: Sasha Levin @ 2025-10-26 18:04 UTC (permalink / raw) To: stable Cc: Darrick J. Wong, Christoph Hellwig, Carlos Maiolino, Carlos Maiolino, Sasha Levin From: "Darrick J. Wong" <djwong@kernel.org> [ Upstream commit 630785bfbe12c3ee3ebccd8b530a98d632b7e39d ] The deprecation of the 'attr2' mount option in 6.18 wasn't entirely successful because nobody noticed that the kernel never printed a warning about attr2 being set in fstab if the only xfs filesystem is the root fs; the initramfs mounts the root fs with no mount options; and the init scripts only conveyed the fstab options by remounting the root fs. Fix this by making it complain all the time. Cc: stable@vger.kernel.org # v5.13 Fixes: 92cf7d36384b99 ("xfs: Skip repetitive warnings about mount options") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Carlos Maiolino <cem@kernel.org> [ Update existing xfs_fs_warn_deprecated() callers ] Signed-off-by: Sasha Levin <sashal@kernel.org> --- fs/xfs/xfs_super.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 201a86b3574da..77eaff6e16b15 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1232,16 +1232,25 @@ suffix_kstrtoint( static inline void xfs_fs_warn_deprecated( struct fs_context *fc, - struct fs_parameter *param, - uint64_t flag, - bool value) + struct fs_parameter *param) { - /* Don't print the warning if reconfiguring and current mount point - * already had the flag set + /* + * Always warn about someone passing in a deprecated mount option. + * Previously we wouldn't print the warning if we were reconfiguring + * and current mount point already had the flag set, but that was not + * the right thing to do. + * + * Many distributions mount the root filesystem with no options in the + * initramfs and rely on mount -a to remount the root fs with the + * options in fstab. However, the old behavior meant that there would + * never be a warning about deprecated mount options for the root fs in + * /etc/fstab. On a single-fs system, that means no warning at all. + * + * Compounding this problem are distribution scripts that copy + * /proc/mounts to fstab, which means that we can't remove mount + * options unless we're 100% sure they have only ever been advertised + * in /proc/mounts in response to explicitly provided mount options. */ - if ((fc->purpose & FS_CONTEXT_FOR_RECONFIGURE) && - !!(XFS_M(fc->root->d_sb)->m_features & flag) == value) - return; xfs_warn(fc->s_fs_info, "%s mount option is deprecated.", param->key); } @@ -1380,19 +1389,19 @@ xfs_fs_parse_param( #endif /* Following mount options will be removed in September 2025 */ case Opt_ikeep: - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_IKEEP, true); + xfs_fs_warn_deprecated(fc, param); parsing_mp->m_features |= XFS_FEAT_IKEEP; return 0; case Opt_noikeep: - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_IKEEP, false); + xfs_fs_warn_deprecated(fc, param); parsing_mp->m_features &= ~XFS_FEAT_IKEEP; return 0; case Opt_attr2: - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_ATTR2, true); + xfs_fs_warn_deprecated(fc, param); parsing_mp->m_features |= XFS_FEAT_ATTR2; return 0; case Opt_noattr2: - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_NOATTR2, true); + xfs_fs_warn_deprecated(fc, param); parsing_mp->m_features |= XFS_FEAT_NOATTR2; return 0; default: -- 2.51.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.12.y] xfs: always warn about deprecated mount options 2025-10-26 18:04 ` [PATCH 6.12.y] xfs: always warn about deprecated mount options Sasha Levin @ 2025-10-27 16:19 ` Darrick J. Wong 0 siblings, 0 replies; 3+ messages in thread From: Darrick J. Wong @ 2025-10-27 16:19 UTC (permalink / raw) To: Sasha Levin; +Cc: stable, Christoph Hellwig, Carlos Maiolino, Carlos Maiolino On Sun, Oct 26, 2025 at 02:04:22PM -0400, Sasha Levin wrote: > From: "Darrick J. Wong" <djwong@kernel.org> > > [ Upstream commit 630785bfbe12c3ee3ebccd8b530a98d632b7e39d ] > > The deprecation of the 'attr2' mount option in 6.18 wasn't entirely > successful because nobody noticed that the kernel never printed a > warning about attr2 being set in fstab if the only xfs filesystem is the > root fs; the initramfs mounts the root fs with no mount options; and the > init scripts only conveyed the fstab options by remounting the root fs. > > Fix this by making it complain all the time. > > Cc: stable@vger.kernel.org # v5.13 > Fixes: 92cf7d36384b99 ("xfs: Skip repetitive warnings about mount options") > Signed-off-by: Darrick J. Wong <djwong@kernel.org> > Reviewed-by: Christoph Hellwig <hch@lst.de> > Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> > Signed-off-by: Carlos Maiolino <cem@kernel.org> > [ Update existing xfs_fs_warn_deprecated() callers ] > Signed-off-by: Sasha Levin <sashal@kernel.org> Looks good to me, thanks for fixing this up! Acked-by: "Darrick J. Wong" <djwong@kernel.org> --D > --- > fs/xfs/xfs_super.c | 33 +++++++++++++++++++++------------ > 1 file changed, 21 insertions(+), 12 deletions(-) > > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index 201a86b3574da..77eaff6e16b15 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -1232,16 +1232,25 @@ suffix_kstrtoint( > static inline void > xfs_fs_warn_deprecated( > struct fs_context *fc, > - struct fs_parameter *param, > - uint64_t flag, > - bool value) > + struct fs_parameter *param) > { > - /* Don't print the warning if reconfiguring and current mount point > - * already had the flag set > + /* > + * Always warn about someone passing in a deprecated mount option. > + * Previously we wouldn't print the warning if we were reconfiguring > + * and current mount point already had the flag set, but that was not > + * the right thing to do. > + * > + * Many distributions mount the root filesystem with no options in the > + * initramfs and rely on mount -a to remount the root fs with the > + * options in fstab. However, the old behavior meant that there would > + * never be a warning about deprecated mount options for the root fs in > + * /etc/fstab. On a single-fs system, that means no warning at all. > + * > + * Compounding this problem are distribution scripts that copy > + * /proc/mounts to fstab, which means that we can't remove mount > + * options unless we're 100% sure they have only ever been advertised > + * in /proc/mounts in response to explicitly provided mount options. > */ > - if ((fc->purpose & FS_CONTEXT_FOR_RECONFIGURE) && > - !!(XFS_M(fc->root->d_sb)->m_features & flag) == value) > - return; > xfs_warn(fc->s_fs_info, "%s mount option is deprecated.", param->key); > } > > @@ -1380,19 +1389,19 @@ xfs_fs_parse_param( > #endif > /* Following mount options will be removed in September 2025 */ > case Opt_ikeep: > - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_IKEEP, true); > + xfs_fs_warn_deprecated(fc, param); > parsing_mp->m_features |= XFS_FEAT_IKEEP; > return 0; > case Opt_noikeep: > - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_IKEEP, false); > + xfs_fs_warn_deprecated(fc, param); > parsing_mp->m_features &= ~XFS_FEAT_IKEEP; > return 0; > case Opt_attr2: > - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_ATTR2, true); > + xfs_fs_warn_deprecated(fc, param); > parsing_mp->m_features |= XFS_FEAT_ATTR2; > return 0; > case Opt_noattr2: > - xfs_fs_warn_deprecated(fc, param, XFS_FEAT_NOATTR2, true); > + xfs_fs_warn_deprecated(fc, param); > parsing_mp->m_features |= XFS_FEAT_NOATTR2; > return 0; > default: > -- > 2.51.0 > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-27 16:19 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-10-26 14:37 FAILED: patch "[PATCH] xfs: always warn about deprecated mount options" failed to apply to 6.12-stable tree gregkh 2025-10-26 18:04 ` [PATCH 6.12.y] xfs: always warn about deprecated mount options Sasha Levin 2025-10-27 16:19 ` Darrick J. Wong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox