On Wed, Jul 12, 2023 at 10:22:02 AM -0700, Darrick J. Wong wrote: > On Tue, Jun 06, 2023 at 02:57:54PM +0530, Chandan Babu R wrote: >> This commit adds functionality to dump metadata from an XFS filesystem in >> newly introduced v2 format. >> >> Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx> >> --- >> db/metadump.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++--- >> 1 file changed, 71 insertions(+), 3 deletions(-) >> >> diff --git a/db/metadump.c b/db/metadump.c >> index b74993c0..537c37f7 100644 >> --- a/db/metadump.c >> +++ b/db/metadump.c >> @@ -3054,6 +3054,70 @@ static struct metadump_ops metadump1_ops = { >> .release = release_metadump_v1, >> }; >> >> +static int >> +init_metadump_v2(void) >> +{ >> + struct xfs_metadump_header xmh = {0}; >> + uint32_t compat_flags = 0; >> + >> + xmh.xmh_magic = cpu_to_be32(XFS_MD_MAGIC_V2); >> + xmh.xmh_version = 2; > > Shouldn't this be cpu_to_be32 as well? > Yes, I will fix this before posting the next version of the patchset. -- chandan