]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_metadump: tag metadump image with informational flags
authorEric Sandeen <sandeen@sandeen.net>
Wed, 21 Jun 2017 22:14:29 +0000 (17:14 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 21 Jun 2017 22:14:29 +0000 (17:14 -0500)
commit2291c68bbf44940c0584a552d74a417d65475a63
tree21187535e13b1c205c84b5a20e4e5886e4879293
parent28a0a30fcb2d7a19c05c1767fb71b8a245bcac3a
xfs_metadump: tag metadump image with informational flags

After the long discussion about warning the user and/or consumer
of xfs_metadumps about dirty logs, it crossed my mind that we
could use the reserved slot in the metadump header to tag the
file with attributes, so the consumer of the metadump knows how
it was created.

This patch adds 4 flags to describe the metadump: The first simply
indicates the presence of any (or no) informational flags.
The old mb_reserved field has been 0 on disk since inception, so
the presence of XFS_METADUMP_INFO_FLAGS indicates that this metadump
may contain the informational flags:

 - dirty log
 - obfuscated
 - full blocks (unused portions of metadata blocks
                are not zeroed out).

It then adds a new option to xfs_mdrestore, "-i" to show info,
which can be used with or without a target file:

# xfs_mdrestore -i metadumpfile
metadumpfile: not obfuscated, clean log, full metadata blocks

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/metadump.c
include/xfs_metadump.h
man/man8/xfs_mdrestore.8
mdrestore/xfs_mdrestore.c