Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: John Garry <john.g.garry@oracle.com>
Cc: aalbersh@kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] mkfs: require reflink for max_atomic_write option
Date: Wed, 30 Jul 2025 08:12:06 -0700	[thread overview]
Message-ID: <20250730151206.GQ2672049@frogsfrogsfrogs> (raw)
In-Reply-To: <20250730101320.2091895-1-john.g.garry@oracle.com>

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
> 
> 

      reply	other threads:[~2025-07-30 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250730151206.GQ2672049@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@kernel.org \
    --cc=john.g.garry@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox