diff options
author | Dave Chinner <david@fromorbit.com> | 2015-08-20 01:28:45 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-08-20 01:28:45 +0200 |
commit | aa493382cb8c5768ba452d87f175fc2aff63911d (patch) | |
tree | 85896c37038d3f5eda1283d090eeb95ee6ec9c82 /fs/xfs/xfs_log_recover.c | |
parent | Merge branch 'xfs-efi-rework' into for-next (diff) | |
parent | xfs: inode lockdep annotations broke non-lockdep build (diff) | |
download | linux-aa493382cb8c5768ba452d87f175fc2aff63911d.tar.xz linux-aa493382cb8c5768ba452d87f175fc2aff63911d.zip |
Merge branch 'xfs-misc-fixes-for-4.3-2' into for-next
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 2e40f5e3cdf2..512a0945d52a 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -1895,15 +1895,25 @@ xlog_recover_get_buf_lsn( */ goto recover_immediately; case XFS_SB_MAGIC: + /* + * superblock uuids are magic. We may or may not have a + * sb_meta_uuid on disk, but it will be set in the in-core + * superblock. We set the uuid pointer for verification + * according to the superblock feature mask to ensure we check + * the relevant UUID in the superblock. + */ lsn = be64_to_cpu(((struct xfs_dsb *)blk)->sb_lsn); - uuid = &((struct xfs_dsb *)blk)->sb_uuid; + if (xfs_sb_version_hasmetauuid(&mp->m_sb)) + uuid = &((struct xfs_dsb *)blk)->sb_meta_uuid; + else + uuid = &((struct xfs_dsb *)blk)->sb_uuid; break; default: break; } if (lsn != (xfs_lsn_t)-1) { - if (!uuid_equal(&mp->m_sb.sb_uuid, uuid)) + if (!uuid_equal(&mp->m_sb.sb_meta_uuid, uuid)) goto recover_immediately; return lsn; } |