diff mbox

[1/4] mkfs: don't create realtime filesystems with reflink enabled

Message ID 151760738718.29371.2619485698764869314.stgit@magnolia (mailing list archive)
State Accepted
Headers show

Commit Message

Darrick J. Wong Feb. 2, 2018, 9:36 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

We don't support reflink on the realtime device, so don't let people
create such things.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 mkfs/xfs_mkfs.c |    7 +++++++
 1 file changed, 7 insertions(+)



--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Eric Sandeen Feb. 2, 2018, 9:38 p.m. UTC | #1
On 2/2/18 3:36 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> We don't support reflink on the realtime device, so don't let people
> create such things.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  mkfs/xfs_mkfs.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 219b209..b20e3d6 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -2025,6 +2025,13 @@ _("cowextsize not supported without reflink support\n"));
>  		usage();
>  	}
>  
> +	if (cli->sb_feat.reflink && cli->xi->rtname) {
> +		fprintf(stderr,
> +_("reflink not supported with realtime devices\n"));
> +		usage();
> +		cli->sb_feat.reflink = false;
> +	}
> +
>  	if (cli->sb_feat.rmapbt && cli->xi->rtname) {
>  		fprintf(stderr,
>  _("rmapbt not supported with realtime devices\n"));
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 219b209..b20e3d6 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2025,6 +2025,13 @@  _("cowextsize not supported without reflink support\n"));
 		usage();
 	}
 
+	if (cli->sb_feat.reflink && cli->xi->rtname) {
+		fprintf(stderr,
+_("reflink not supported with realtime devices\n"));
+		usage();
+		cli->sb_feat.reflink = false;
+	}
+
 	if (cli->sb_feat.rmapbt && cli->xi->rtname) {
 		fprintf(stderr,
 _("rmapbt not supported with realtime devices\n"));