All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mkfs: warn out the V4 format
@ 2021-04-21  8:57 Gao Xiang
  2021-04-21 15:55 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Gao Xiang @ 2021-04-21  8:57 UTC (permalink / raw)
  To: linux-xfs, Eric Sandeen; +Cc: Gao Xiang, Darrick J . Wong

Kernel commit b96cb835e37c ("xfs: deprecate the V4 format") started
the process of retiring the old format to close off attack surfaces
and to encourage users to migrate onto V5.

This also prints warning to users when mkfs as well.

Suggested-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
---
 mkfs/xfs_mkfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 0eac5336..ef09f8b3 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -4022,6 +4022,10 @@ main(
 	validate_extsize_hint(mp, &cli);
 	validate_cowextsize_hint(mp, &cli);
 
+	if (!cli.sb_feat.crcs_enabled)
+		fprintf(stderr,
+_("Deprecated V4 format (-mcrc=0) will not be supported after September 2030.\n"));
+
 	/* Print the intended geometry of the fs. */
 	if (!quiet || dry_run) {
 		struct xfs_fsop_geom	geo;
-- 
2.27.0


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

* Re: [PATCH] mkfs: warn out the V4 format
  2021-04-21  8:57 [PATCH] mkfs: warn out the V4 format Gao Xiang
@ 2021-04-21 15:55 ` Darrick J. Wong
  2021-04-21 16:36   ` Gao Xiang
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2021-04-21 15:55 UTC (permalink / raw)
  To: Gao Xiang; +Cc: linux-xfs, Eric Sandeen

On Wed, Apr 21, 2021 at 04:57:16PM +0800, Gao Xiang wrote:
> Kernel commit b96cb835e37c ("xfs: deprecate the V4 format") started
> the process of retiring the old format to close off attack surfaces
> and to encourage users to migrate onto V5.
> 
> This also prints warning to users when mkfs as well.
> 
> Suggested-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>

Looks fine to me; but does this cause any golden output failures in
fstests?

--D

> ---
>  mkfs/xfs_mkfs.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 0eac5336..ef09f8b3 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -4022,6 +4022,10 @@ main(
>  	validate_extsize_hint(mp, &cli);
>  	validate_cowextsize_hint(mp, &cli);
>  
> +	if (!cli.sb_feat.crcs_enabled)
> +		fprintf(stderr,
> +_("Deprecated V4 format (-mcrc=0) will not be supported after September 2030.\n"));
> +
>  	/* Print the intended geometry of the fs. */
>  	if (!quiet || dry_run) {
>  		struct xfs_fsop_geom	geo;
> -- 
> 2.27.0
> 

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

* Re: [PATCH] mkfs: warn out the V4 format
  2021-04-21 15:55 ` Darrick J. Wong
@ 2021-04-21 16:36   ` Gao Xiang
  0 siblings, 0 replies; 3+ messages in thread
From: Gao Xiang @ 2021-04-21 16:36 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, Eric Sandeen

Hi Darrick,

On Wed, Apr 21, 2021 at 08:55:14AM -0700, Darrick J. Wong wrote:
> On Wed, Apr 21, 2021 at 04:57:16PM +0800, Gao Xiang wrote:
> > Kernel commit b96cb835e37c ("xfs: deprecate the V4 format") started
> > the process of retiring the old format to close off attack surfaces
> > and to encourage users to migrate onto V5.
> > 
> > This also prints warning to users when mkfs as well.
> > 
> > Suggested-by: Darrick J. Wong <djwong@kernel.org>
> > Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
> 
> Looks fine to me; but does this cause any golden output failures in
> fstests?

ok, I will check mkfs_filter later.

(btw, just in case... would you mind reply the message below:
 https://lore.kernel.org/r/20210420200029.GA3028214@xiangao.remote.csb
 so I could refine the series and send out the next version later?

 Also I still have no idea how to handle [PATCH v2 1/2], since
 I'd like just add some comments here to explain why sb_ifree,
 sb_icount doesn't matter and such logic can be (and will be)
 totally removed after [PATCH v2 2/2] in short time. )

Thanks,
Gao Xiang

> 
> --D
> 
> > ---
> >  mkfs/xfs_mkfs.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> > index 0eac5336..ef09f8b3 100644
> > --- a/mkfs/xfs_mkfs.c
> > +++ b/mkfs/xfs_mkfs.c
> > @@ -4022,6 +4022,10 @@ main(
> >  	validate_extsize_hint(mp, &cli);
> >  	validate_cowextsize_hint(mp, &cli);
> >  
> > +	if (!cli.sb_feat.crcs_enabled)
> > +		fprintf(stderr,
> > +_("Deprecated V4 format (-mcrc=0) will not be supported after September 2030.\n"));
> > +
> >  	/* Print the intended geometry of the fs. */
> >  	if (!quiet || dry_run) {
> >  		struct xfs_fsop_geom	geo;
> > -- 
> > 2.27.0
> > 
> 


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

end of thread, other threads:[~2021-04-21 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21  8:57 [PATCH] mkfs: warn out the V4 format Gao Xiang
2021-04-21 15:55 ` Darrick J. Wong
2021-04-21 16:36   ` Gao Xiang

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.