]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs_dir2_node.c
xfsprogs: Add new sb_meta_uuid field, update userspace tools to manipulate it
authorEric Sandeen <sandeen@sandeen.net>
Mon, 3 Aug 2015 00:45:00 +0000 (10:45 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 3 Aug 2015 00:45:00 +0000 (10:45 +1000)
commit9c4e12fb60c15dc9c5e54041c9679454b42cb23e
treefd6d2eda8097a4eb9f745c1cc35d9fd61589095a
parent0d995d036bd9da592f037bc414f2b99cb0164ec7
xfsprogs: Add new sb_meta_uuid field, update userspace tools to manipulate it

This adds a new superblock field, sb_meta_uuid.  This allows us to
change the use-visible UUID on crc-enabled filesytems from userspace
if desired, by copying the existing UUID to the new location for
metadata comparisons.  If this is done, an incompat flag must be
set to prevent older filesystems from mounting the filesystem, but
the original UUID can be restored, and the incompat flag removed,
with a new xfs_db / xfs_admin UUID command, "restore."

Much of this patch mirrors the kernel patch in simply renaming
the field used for metadata uuid comparison; other bits:

* Teach xfs_db to print the new meta_uuid field
* Allow xfs_db to generate a new UUID for CRC-enabled filesystems
* Allow xfs_db to revert to the original UUID and clear the flag
* Fix up xfs_copy to work with CRC-enabled filesystems
* Update the xfs_admin manpage to show the UUID "restore" command

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
29 files changed:
copy/xfs_copy.c
db/sb.c
libxfs/xfs_alloc.c
libxfs/xfs_alloc_btree.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_attr_remote.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.c
libxfs/xfs_da_btree.c
libxfs/xfs_dir2_block.c
libxfs/xfs_dir2_data.c
libxfs/xfs_dir2_leaf.c
libxfs/xfs_dir2_node.c
libxfs/xfs_dquot_buf.c
libxfs/xfs_format.h
libxfs/xfs_ialloc.c
libxfs/xfs_ialloc_btree.c
libxfs/xfs_inode_buf.c
libxfs/xfs_sb.c
libxfs/xfs_symlink_remote.c
libxlog/util.c
man/man8/xfs_admin.8
man/man8/xfs_db.8
mkfs/xfs_mkfs.c
repair/agheader.c
repair/agheader.h
repair/dinode.c
repair/phase5.c
repair/phase6.c