* [PATCH] mkfs: require reflink for max_atomic_write option
@ 2025-07-30 10:13 John Garry
2025-07-30 15:12 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: John Garry @ 2025-07-30 10:13 UTC (permalink / raw)
To: aalbersh; +Cc: linux-xfs, djwong, John Garry
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 <john.g.garry@oracle.com>
Suggested-by: "Darrick J. Wong" <djwong@kernel.org>
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index b889c0de..8cd4ccd7 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -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.
*/
--
2.43.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mkfs: require reflink for max_atomic_write option
2025-07-30 10:13 [PATCH] mkfs: require reflink for max_atomic_write option John Garry
@ 2025-07-30 15:12 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2025-07-30 15:12 UTC (permalink / raw)
To: John Garry; +Cc: aalbersh, linux-xfs
On Wed, Jul 30, 2025 at 10:13:20AM +0000, John Garry wrote:
> 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 <john.g.garry@oracle.com>
> Suggested-by: "Darrick J. Wong" <djwong@kernel.org>
Yeah, makes sense to me :P
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
>
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index b889c0de..8cd4ccd7 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -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.
> */
> --
> 2.43.5
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-30 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 10:13 [PATCH] mkfs: require reflink for max_atomic_write option John Garry
2025-07-30 15:12 ` 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;
as well as URLs for NNTP newsgroup(s).