diff options
author | Dave Chinner <david@fromorbit.com> | 2015-08-20 09:28:45 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-08-20 09:28:45 +1000 |
commit | aa493382cb8c5768ba452d87f175fc2aff63911d (patch) | |
tree | 85896c37038d3f5eda1283d090eeb95ee6ec9c82 /fs/xfs/xfs_log_recover.c | |
parent | 5be203ad115c1d8294e8685253e05fcea0202e04 (diff) | |
parent | 3403ccc0c9f069c40ea751a93ac6746f5ef2116a (diff) | |
download | linux-stable-aa493382cb8c5768ba452d87f175fc2aff63911d.tar.gz linux-stable-aa493382cb8c5768ba452d87f175fc2aff63911d.tar.bz2 linux-stable-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; } |