diff mbox series

[10/24] metadump: Rename XFS_MD_MAGIC to XFS_MD_MAGIC_V1

Message ID 20230523090050.373545-11-chandan.babu@oracle.com (mailing list archive)
State Superseded
Headers show
Series Metadump v2 | expand

Commit Message

Chandan Babu R May 23, 2023, 9 a.m. UTC
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
---
 db/metadump.c             | 2 +-
 include/xfs_metadump.h    | 2 +-
 mdrestore/xfs_mdrestore.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Darrick J. Wong May 23, 2023, 5:27 p.m. UTC | #1
On Tue, May 23, 2023 at 02:30:36PM +0530, Chandan Babu R wrote:
> Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>

Good thing we didn't publish XFS_MD_MAGIC in xfslibs-dev...

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  db/metadump.c             | 2 +-
>  include/xfs_metadump.h    | 2 +-
>  mdrestore/xfs_mdrestore.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/db/metadump.c b/db/metadump.c
> index 7265f73ec..9d7ad76ae 100644
> --- a/db/metadump.c
> +++ b/db/metadump.c
> @@ -2950,7 +2950,7 @@ init_metadump_v1(void)
>  		return -1;
>  	}
>  	metadump.metablock->mb_blocklog = BBSHIFT;
> -	metadump.metablock->mb_magic = cpu_to_be32(XFS_MD_MAGIC);
> +	metadump.metablock->mb_magic = cpu_to_be32(XFS_MD_MAGIC_V1);
>  
>  	/* Set flags about state of metadump */
>  	metadump.metablock->mb_info = XFS_METADUMP_INFO_FLAGS;
> diff --git a/include/xfs_metadump.h b/include/xfs_metadump.h
> index fbd990232..a4dca25cb 100644
> --- a/include/xfs_metadump.h
> +++ b/include/xfs_metadump.h
> @@ -7,7 +7,7 @@
>  #ifndef _XFS_METADUMP_H_
>  #define _XFS_METADUMP_H_
>  
> -#define	XFS_MD_MAGIC		0x5846534d	/* 'XFSM' */
> +#define	XFS_MD_MAGIC_V1		0x5846534d	/* 'XFSM' */
>  
>  typedef struct xfs_metablock {
>  	__be32		mb_magic;
> diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
> index 333282ed2..481dd00c2 100644
> --- a/mdrestore/xfs_mdrestore.c
> +++ b/mdrestore/xfs_mdrestore.c
> @@ -240,7 +240,7 @@ main(
>  
>  	if (fread(&mb, sizeof(mb), 1, src_f) != 1)
>  		fatal("error reading from metadump file\n");
> -	if (mb.mb_magic != cpu_to_be32(XFS_MD_MAGIC))
> +	if (mb.mb_magic != cpu_to_be32(XFS_MD_MAGIC_V1))
>  		fatal("specified file is not a metadata dump\n");
>  
>  	if (show_info) {
> -- 
> 2.39.1
>
diff mbox series

Patch

diff --git a/db/metadump.c b/db/metadump.c
index 7265f73ec..9d7ad76ae 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -2950,7 +2950,7 @@  init_metadump_v1(void)
 		return -1;
 	}
 	metadump.metablock->mb_blocklog = BBSHIFT;
-	metadump.metablock->mb_magic = cpu_to_be32(XFS_MD_MAGIC);
+	metadump.metablock->mb_magic = cpu_to_be32(XFS_MD_MAGIC_V1);
 
 	/* Set flags about state of metadump */
 	metadump.metablock->mb_info = XFS_METADUMP_INFO_FLAGS;
diff --git a/include/xfs_metadump.h b/include/xfs_metadump.h
index fbd990232..a4dca25cb 100644
--- a/include/xfs_metadump.h
+++ b/include/xfs_metadump.h
@@ -7,7 +7,7 @@ 
 #ifndef _XFS_METADUMP_H_
 #define _XFS_METADUMP_H_
 
-#define	XFS_MD_MAGIC		0x5846534d	/* 'XFSM' */
+#define	XFS_MD_MAGIC_V1		0x5846534d	/* 'XFSM' */
 
 typedef struct xfs_metablock {
 	__be32		mb_magic;
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index 333282ed2..481dd00c2 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -240,7 +240,7 @@  main(
 
 	if (fread(&mb, sizeof(mb), 1, src_f) != 1)
 		fatal("error reading from metadump file\n");
-	if (mb.mb_magic != cpu_to_be32(XFS_MD_MAGIC))
+	if (mb.mb_magic != cpu_to_be32(XFS_MD_MAGIC_V1))
 		fatal("specified file is not a metadata dump\n");
 
 	if (show_info) {