All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2]
@ 2020-09-25 16:50 Pavel Reichl
  2020-09-25 16:50 ` [PATCH v2 1/2] xfs: remove deprecated mount options Pavel Reichl
  2020-09-25 16:50 ` [PATCH v2 2/2] xfs: remove deprecated sysctl options Pavel Reichl
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Reichl @ 2020-09-25 16:50 UTC (permalink / raw)
  To: linux-xfs

 xfs: remove deprecated mount and sysctl options

Hi,

by Eric and Dave's suggestion I prepared a patchset which adds warnings about
using deprecated options. I tried to justify the changes in commit
messages based on the info from Eric and Dave.

If this patchsed should be merged I need to know when the options are
actually eliminated, so documentation can be properly updated.

Thanks.

V2 update:
Added comment to mount options that are being deprecated
Added Sep 2020 to documentation as a planned date of removal

Pavel Reichl (2):
  xfs: remove deprecated mount options
  xfs: remove deprecated sysctl options

 Documentation/admin-guide/xfs.rst |  5 ++++-
 fs/xfs/xfs_super.c                | 31 +++++++++++++++-----------
 fs/xfs/xfs_sysctl.c               | 36 +++++++++++++++++++++++++++++--
 3 files changed, 56 insertions(+), 16 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] xfs: remove deprecated mount options
  2020-09-25 16:50 [PATCH v2 0/2] Pavel Reichl
@ 2020-09-25 16:50 ` Pavel Reichl
  2020-09-25 18:13   ` Darrick J. Wong
  2020-09-25 16:50 ` [PATCH v2 2/2] xfs: remove deprecated sysctl options Pavel Reichl
  1 sibling, 1 reply; 5+ messages in thread
From: Pavel Reichl @ 2020-09-25 16:50 UTC (permalink / raw)
  To: linux-xfs

ikeep/noikeep was a workaround for old DMAPI code which is no longer
relevant.

attr2/noattr2 - is for controlling upgrade behaviour from fixed attribute
fork sizes in the inode (attr1) and dynamic attribute fork sizes (attr2).
mkfs has defaulted to setting attr2 since 2007, hence just about every
XFS filesystem out there in production right now uses attr2.

Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
 Documentation/admin-guide/xfs.rst |  2 ++
 fs/xfs/xfs_super.c                | 31 ++++++++++++++++++-------------
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/Documentation/admin-guide/xfs.rst b/Documentation/admin-guide/xfs.rst
index f461d6c33534..717f63a3607a 100644
--- a/Documentation/admin-guide/xfs.rst
+++ b/Documentation/admin-guide/xfs.rst
@@ -217,6 +217,8 @@ Deprecated Mount Options
 ===========================     ================
   Name				Removal Schedule
 ===========================     ================
+  ikeep/noikeep			September 2025
+  attr2/noattr2			September 2025
 ===========================     ================
 
 
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 71ac6c1cdc36..1a04a03213c8 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1234,25 +1234,12 @@ xfs_fc_parse_param(
 	case Opt_nouuid:
 		mp->m_flags |= XFS_MOUNT_NOUUID;
 		return 0;
-	case Opt_ikeep:
-		mp->m_flags |= XFS_MOUNT_IKEEP;
-		return 0;
-	case Opt_noikeep:
-		mp->m_flags &= ~XFS_MOUNT_IKEEP;
-		return 0;
 	case Opt_largeio:
 		mp->m_flags |= XFS_MOUNT_LARGEIO;
 		return 0;
 	case Opt_nolargeio:
 		mp->m_flags &= ~XFS_MOUNT_LARGEIO;
 		return 0;
-	case Opt_attr2:
-		mp->m_flags |= XFS_MOUNT_ATTR2;
-		return 0;
-	case Opt_noattr2:
-		mp->m_flags &= ~XFS_MOUNT_ATTR2;
-		mp->m_flags |= XFS_MOUNT_NOATTR2;
-		return 0;
 	case Opt_filestreams:
 		mp->m_flags |= XFS_MOUNT_FILESTREAMS;
 		return 0;
@@ -1304,6 +1291,24 @@ xfs_fc_parse_param(
 		xfs_mount_set_dax_mode(mp, result.uint_32);
 		return 0;
 #endif
+	/* Following mount options well be removed on September 2025 */
+	case Opt_ikeep:
+		xfs_warn(mp, "%s mount option is deprecated.", param->key);
+		mp->m_flags |= XFS_MOUNT_IKEEP;
+		return 0;
+	case Opt_noikeep:
+		xfs_warn(mp, "%s mount option is deprecated.", param->key);
+		mp->m_flags &= ~XFS_MOUNT_IKEEP;
+		return 0;
+	case Opt_attr2:
+		xfs_warn(mp, "%s mount option is deprecated.", param->key);
+		mp->m_flags |= XFS_MOUNT_ATTR2;
+		return 0;
+	case Opt_noattr2:
+		xfs_warn(mp, "%s mount option is deprecated.", param->key);
+		mp->m_flags &= ~XFS_MOUNT_ATTR2;
+		mp->m_flags |= XFS_MOUNT_NOATTR2;
+		return 0;
 	default:
 		xfs_warn(mp, "unknown mount option [%s].", param->key);
 		return -EINVAL;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] xfs: remove deprecated sysctl options
  2020-09-25 16:50 [PATCH v2 0/2] Pavel Reichl
  2020-09-25 16:50 ` [PATCH v2 1/2] xfs: remove deprecated mount options Pavel Reichl
@ 2020-09-25 16:50 ` Pavel Reichl
  2020-09-25 18:14   ` Darrick J. Wong
  1 sibling, 1 reply; 5+ messages in thread
From: Pavel Reichl @ 2020-09-25 16:50 UTC (permalink / raw)
  To: linux-xfs

These optionr were for Irix compatibility, probably for clustered XFS
clients in a heterogenous cluster which contained both Irix & Linux
machines, so that behavior would be consistent. That doesn't exist anymore
and it's no longer needed.

Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
 Documentation/admin-guide/xfs.rst |  3 ++-
 fs/xfs/xfs_sysctl.c               | 36 +++++++++++++++++++++++++++++--
 2 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/Documentation/admin-guide/xfs.rst b/Documentation/admin-guide/xfs.rst
index 717f63a3607a..ce32d9d8529d 100644
--- a/Documentation/admin-guide/xfs.rst
+++ b/Documentation/admin-guide/xfs.rst
@@ -333,7 +333,8 @@ The following sysctls are available for the XFS filesystem:
 Deprecated Sysctls
 ==================
 
-None at present.
+fs.xfs.irix_sgid_inherit
+fs.xfs.irix_symlink_mode
 
 
 Removed Sysctls
diff --git a/fs/xfs/xfs_sysctl.c b/fs/xfs/xfs_sysctl.c
index 021ef96d0542..fac9de7ee6d0 100644
--- a/fs/xfs/xfs_sysctl.c
+++ b/fs/xfs/xfs_sysctl.c
@@ -50,13 +50,45 @@ xfs_panic_mask_proc_handler(
 }
 #endif /* CONFIG_PROC_FS */
 
+STATIC int
+xfs_deprecate_irix_sgid_inherit_proc_handler(
+	struct ctl_table	*ctl,
+	int			write,
+	void			*buffer,
+	size_t			*lenp,
+	loff_t			*ppos)
+{
+	if (write) {
+		printk_once(KERN_WARNING
+				"XFS: " "%s sysctl option is deprecated.\n",
+				ctl->procname);
+	}
+	return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
+}
+
+STATIC int
+xfs_deprecate_irix_symlink_mode_proc_handler(
+	struct ctl_table	*ctl,
+	int			write,
+	void			*buffer,
+	size_t			*lenp,
+	loff_t			*ppos)
+{
+	if (write) {
+		printk_once(KERN_WARNING
+				"XFS: " "%s sysctl option is deprecated.\n",
+				ctl->procname);
+	}
+	return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
+}
+
 static struct ctl_table xfs_table[] = {
 	{
 		.procname	= "irix_sgid_inherit",
 		.data		= &xfs_params.sgid_inherit.val,
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
+		.proc_handler	= xfs_deprecate_irix_sgid_inherit_proc_handler,
 		.extra1		= &xfs_params.sgid_inherit.min,
 		.extra2		= &xfs_params.sgid_inherit.max
 	},
@@ -65,7 +97,7 @@ static struct ctl_table xfs_table[] = {
 		.data		= &xfs_params.symlink_mode.val,
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
+		.proc_handler	= xfs_deprecate_irix_symlink_mode_proc_handler,
 		.extra1		= &xfs_params.symlink_mode.min,
 		.extra2		= &xfs_params.symlink_mode.max
 	},
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] xfs: remove deprecated mount options
  2020-09-25 16:50 ` [PATCH v2 1/2] xfs: remove deprecated mount options Pavel Reichl
@ 2020-09-25 18:13   ` Darrick J. Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2020-09-25 18:13 UTC (permalink / raw)
  To: Pavel Reichl; +Cc: linux-xfs

On Fri, Sep 25, 2020 at 06:50:04PM +0200, Pavel Reichl wrote:
> ikeep/noikeep was a workaround for old DMAPI code which is no longer
> relevant.
> 
> attr2/noattr2 - is for controlling upgrade behaviour from fixed attribute
> fork sizes in the inode (attr1) and dynamic attribute fork sizes (attr2).
> mkfs has defaulted to setting attr2 since 2007, hence just about every
> XFS filesystem out there in production right now uses attr2.
> 
> Signed-off-by: Pavel Reichl <preichl@redhat.com>
> ---
>  Documentation/admin-guide/xfs.rst |  2 ++
>  fs/xfs/xfs_super.c                | 31 ++++++++++++++++++-------------
>  2 files changed, 20 insertions(+), 13 deletions(-)
> 
> diff --git a/Documentation/admin-guide/xfs.rst b/Documentation/admin-guide/xfs.rst
> index f461d6c33534..717f63a3607a 100644
> --- a/Documentation/admin-guide/xfs.rst
> +++ b/Documentation/admin-guide/xfs.rst
> @@ -217,6 +217,8 @@ Deprecated Mount Options
>  ===========================     ================
>    Name				Removal Schedule
>  ===========================     ================
> +  ikeep/noikeep			September 2025
> +  attr2/noattr2			September 2025
>  ===========================     ================
>  
>  
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 71ac6c1cdc36..1a04a03213c8 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1234,25 +1234,12 @@ xfs_fc_parse_param(
>  	case Opt_nouuid:
>  		mp->m_flags |= XFS_MOUNT_NOUUID;
>  		return 0;
> -	case Opt_ikeep:
> -		mp->m_flags |= XFS_MOUNT_IKEEP;
> -		return 0;
> -	case Opt_noikeep:
> -		mp->m_flags &= ~XFS_MOUNT_IKEEP;
> -		return 0;
>  	case Opt_largeio:
>  		mp->m_flags |= XFS_MOUNT_LARGEIO;
>  		return 0;
>  	case Opt_nolargeio:
>  		mp->m_flags &= ~XFS_MOUNT_LARGEIO;
>  		return 0;
> -	case Opt_attr2:
> -		mp->m_flags |= XFS_MOUNT_ATTR2;
> -		return 0;
> -	case Opt_noattr2:
> -		mp->m_flags &= ~XFS_MOUNT_ATTR2;
> -		mp->m_flags |= XFS_MOUNT_NOATTR2;
> -		return 0;
>  	case Opt_filestreams:
>  		mp->m_flags |= XFS_MOUNT_FILESTREAMS;
>  		return 0;
> @@ -1304,6 +1291,24 @@ xfs_fc_parse_param(
>  		xfs_mount_set_dax_mode(mp, result.uint_32);
>  		return 0;
>  #endif
> +	/* Following mount options well be removed on September 2025 */

well -> will, on -> in

I fixed that on commit, so
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> +	case Opt_ikeep:
> +		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> +		mp->m_flags |= XFS_MOUNT_IKEEP;
> +		return 0;
> +	case Opt_noikeep:
> +		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> +		mp->m_flags &= ~XFS_MOUNT_IKEEP;
> +		return 0;
> +	case Opt_attr2:
> +		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> +		mp->m_flags |= XFS_MOUNT_ATTR2;
> +		return 0;
> +	case Opt_noattr2:
> +		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> +		mp->m_flags &= ~XFS_MOUNT_ATTR2;
> +		mp->m_flags |= XFS_MOUNT_NOATTR2;
> +		return 0;
>  	default:
>  		xfs_warn(mp, "unknown mount option [%s].", param->key);
>  		return -EINVAL;
> -- 
> 2.26.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] xfs: remove deprecated sysctl options
  2020-09-25 16:50 ` [PATCH v2 2/2] xfs: remove deprecated sysctl options Pavel Reichl
@ 2020-09-25 18:14   ` Darrick J. Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2020-09-25 18:14 UTC (permalink / raw)
  To: Pavel Reichl; +Cc: linux-xfs

On Fri, Sep 25, 2020 at 06:50:05PM +0200, Pavel Reichl wrote:
> These optionr were for Irix compatibility, probably for clustered XFS
> clients in a heterogenous cluster which contained both Irix & Linux
> machines, so that behavior would be consistent. That doesn't exist anymore
> and it's no longer needed.
> 
> Signed-off-by: Pavel Reichl <preichl@redhat.com>
> ---
>  Documentation/admin-guide/xfs.rst |  3 ++-
>  fs/xfs/xfs_sysctl.c               | 36 +++++++++++++++++++++++++++++--
>  2 files changed, 36 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/admin-guide/xfs.rst b/Documentation/admin-guide/xfs.rst
> index 717f63a3607a..ce32d9d8529d 100644
> --- a/Documentation/admin-guide/xfs.rst
> +++ b/Documentation/admin-guide/xfs.rst
> @@ -333,7 +333,8 @@ The following sysctls are available for the XFS filesystem:
>  Deprecated Sysctls
>  ==================
>  
> -None at present.
> +fs.xfs.irix_sgid_inherit
> +fs.xfs.irix_symlink_mode

Assuming everyone's fine with removing these in September 2025 as well,
I'll tweak this patch to state that date in a table like all the other
deprecated/removed stuff.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

>  
>  
>  Removed Sysctls
> diff --git a/fs/xfs/xfs_sysctl.c b/fs/xfs/xfs_sysctl.c
> index 021ef96d0542..fac9de7ee6d0 100644
> --- a/fs/xfs/xfs_sysctl.c
> +++ b/fs/xfs/xfs_sysctl.c
> @@ -50,13 +50,45 @@ xfs_panic_mask_proc_handler(
>  }
>  #endif /* CONFIG_PROC_FS */
>  
> +STATIC int
> +xfs_deprecate_irix_sgid_inherit_proc_handler(
> +	struct ctl_table	*ctl,
> +	int			write,
> +	void			*buffer,
> +	size_t			*lenp,
> +	loff_t			*ppos)
> +{
> +	if (write) {
> +		printk_once(KERN_WARNING
> +				"XFS: " "%s sysctl option is deprecated.\n",
> +				ctl->procname);
> +	}
> +	return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
> +}
> +
> +STATIC int
> +xfs_deprecate_irix_symlink_mode_proc_handler(
> +	struct ctl_table	*ctl,
> +	int			write,
> +	void			*buffer,
> +	size_t			*lenp,
> +	loff_t			*ppos)
> +{
> +	if (write) {
> +		printk_once(KERN_WARNING
> +				"XFS: " "%s sysctl option is deprecated.\n",
> +				ctl->procname);
> +	}
> +	return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
> +}
> +
>  static struct ctl_table xfs_table[] = {
>  	{
>  		.procname	= "irix_sgid_inherit",
>  		.data		= &xfs_params.sgid_inherit.val,
>  		.maxlen		= sizeof(int),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec_minmax,
> +		.proc_handler	= xfs_deprecate_irix_sgid_inherit_proc_handler,
>  		.extra1		= &xfs_params.sgid_inherit.min,
>  		.extra2		= &xfs_params.sgid_inherit.max
>  	},
> @@ -65,7 +97,7 @@ static struct ctl_table xfs_table[] = {
>  		.data		= &xfs_params.symlink_mode.val,
>  		.maxlen		= sizeof(int),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec_minmax,
> +		.proc_handler	= xfs_deprecate_irix_symlink_mode_proc_handler,
>  		.extra1		= &xfs_params.symlink_mode.min,
>  		.extra2		= &xfs_params.symlink_mode.max
>  	},
> -- 
> 2.26.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-25 18:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 16:50 [PATCH v2 0/2] Pavel Reichl
2020-09-25 16:50 ` [PATCH v2 1/2] xfs: remove deprecated mount options Pavel Reichl
2020-09-25 18:13   ` Darrick J. Wong
2020-09-25 16:50 ` [PATCH v2 2/2] xfs: remove deprecated sysctl options Pavel Reichl
2020-09-25 18:14   ` Darrick J. Wong

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.