summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_sb.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2015-07-29 11:54:21 +1000
committerDave Chinner <david@fromorbit.com>2015-07-29 11:54:21 +1000
commit5461ad99cab98d19f2570c468cdd6c42b6d66795 (patch)
tree7050a1529a6da548bc17d93c866e5a4ddd167f48 /fs/xfs/libxfs/xfs_sb.c
parent20b83944361908be78c941e0fb76d508124637ec (diff)
parentce748eaa65f2e9392ba82726503c8d994ffd6393 (diff)
downloadop-kernel-dev-5461ad99cab98d19f2570c468cdd6c42b6d66795.zip
op-kernel-dev-5461ad99cab98d19f2570c468cdd6c42b6d66795.tar.gz
Merge branch 'xfs-meta-uuid' into for-next
Diffstat (limited to 'fs/xfs/libxfs/xfs_sb.c')
-rw-r--r--fs/xfs/libxfs/xfs_sb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index a3f4504..21009db 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -402,6 +402,14 @@ __xfs_sb_from_disk(
to->sb_spino_align = be32_to_cpu(from->sb_spino_align);
to->sb_pquotino = be64_to_cpu(from->sb_pquotino);
to->sb_lsn = be64_to_cpu(from->sb_lsn);
+ /*
+ * sb_meta_uuid is only on disk if it differs from sb_uuid and the
+ * feature flag is set; if not set we keep it only in memory.
+ */
+ if (xfs_sb_version_hasmetauuid(to))
+ uuid_copy(&to->sb_meta_uuid, &from->sb_meta_uuid);
+ else
+ uuid_copy(&to->sb_meta_uuid, &from->sb_uuid);
/* Convert on-disk flags to in-memory flags? */
if (convert_xquota)
xfs_sb_quota_from_disk(to);
@@ -543,6 +551,8 @@ xfs_sb_to_disk(
cpu_to_be32(from->sb_features_log_incompat);
to->sb_spino_align = cpu_to_be32(from->sb_spino_align);
to->sb_lsn = cpu_to_be64(from->sb_lsn);
+ if (xfs_sb_version_hasmetauuid(from))
+ uuid_copy(&to->sb_meta_uuid, &from->sb_meta_uuid);
}
}
OpenPOWER on IntegriCloud