mkfs: require reflink for max_atomic_write option
PATCH 1/1 mkfs: require reflink for max_atomic_write option
For max_atomic_write option to be set, it means that the user wants to support atomic writes up to that size.
However, to support this we must have reflink, so enforce that this is available.
Signed-off-by John Garry <[email protected]>
Suggested-by "Darrick J. Wong" <[email protected]>
mkfs/xfs_mkfs.c +6 -0
@@ -3101,6 +3101,12 @@ _("metadir not supported without exchange-range support\n")); cli->sb_feat.exchrange = true; } +if (cli_opt_set (&iopts,I_MAX_ATOMIC_WRITE ) && !cli->sb_feat.reflink) { +fprintf (stderr, +_ ("max_atomic_write option not supported without reflink support\n" )); +usage (); + } +/* * Copy features across to config structure now. */
Signature · 1 line
2.43.5
Quoted 8 lines · John Garry
For
max_atomic_writeoption to be set, it means that the user wants to support atomic writes up to that size.However, to support this we must have reflink, so enforce that this is available.
Signed-off-by John Garry <[email protected]>Suggested-by "Darrick J. Wong" <[email protected]>
Yeah, makes sense to me :P
Reviewed-by "Darrick J. Wong" <[email protected]>
--D
Quoted 22 lines
mkfs/xfs_mkfs.c +6
-0@@ -3101,6 +3101,12 @@ _("metadir not supported without exchange-range support\n")); cli->sb_feat.exchrange = true; } +if (cli_opt_set (&iopts,I_MAX_ATOMIC_WRITE ) && !cli->sb_feat.reflink) { +fprintf (stderr, +_ ("max_atomic_write option not supported without reflink support\n" )); +usage (); + } +/* * Copy features across to config structure now. */ Signature · 1 line
2.43.5