Skip to contentSkip to conversation

mkfs: warn out the V4 format

PATCH In review Gao Xiang 2 participants 3 messages Apr 21, 2021

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 mkfs: warn out the V4 format

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.

---
 mkfs/xfs_mkfs.c | 4 ++++
 1 file changed, 4 insertions(+)
mkfs/xfs_mkfs.c +4 -0
index 0eac5336..ef09f8b3 100644
@@ -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;
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Gao Xiang

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.

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

--D

Quoted 22 lines
---
 mkfs/xfs_mkfs.c | 4 ++++
 1 file changed, 4 insertions(+)
mkfs/xfs_mkfs.c +4 -0
index 0eac5336..ef09f8b3 100644
@@ -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;
Signature · 1 line
2.27.0
author
#2 lore raw

Hi Darrick,

Quoted 5 lines · Darrick J. Wong
Quoted 4 lines · Gao Xiang

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.

Quoted 7 lines
Quoted 4 lines

This also prints warning to users when mkfs as well.

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/[email protected]
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

Quoted 26 lines

--D

Quoted 22 lines
---
 mkfs/xfs_mkfs.c | 4 ++++
 1 file changed, 4 insertions(+)
mkfs/xfs_mkfs.c +4 -0
index 0eac5336..ef09f8b3 100644
@@ -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;
Signature · 1 line
2.27.0