Re: [PATCH 10/24] metadump: Rename XFS_MD_MAGIC to XFS_MD_MAGIC_V1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 23, 2023 at 02:30:36PM +0530, Chandan Babu R wrote:
> Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>

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

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

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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux