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>