From: Dave Chinner Date: Wed, 19 Aug 2015 23:28:45 +0000 (+1000) Subject: Merge branch 'xfs-misc-fixes-for-4.3-2' into for-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa493382cb8c5768ba452d87f175fc2aff63911d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'xfs-misc-fixes-for-4.3-2' into for-next --- aa493382cb8c5768ba452d87f175fc2aff63911d diff --cc fs/xfs/xfs_log_recover.c index 2e40f5e3cdf2,86c3de477a9d..512a0945d52a --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@@ -1886,17 -1886,22 +1886,27 @@@ xlog_recover_get_buf_lsn uuid = &((struct xfs_dir3_blk_hdr *)blk)->uuid; break; case XFS_ATTR3_RMT_MAGIC: - lsn = be64_to_cpu(((struct xfs_attr3_rmt_hdr *)blk)->rm_lsn); - uuid = &((struct xfs_attr3_rmt_hdr *)blk)->rm_uuid; - break; + /* + * Remote attr blocks are written synchronously, rather than + * being logged. That means they do not contain a valid LSN + * (i.e. transactionally ordered) in them, and hence any time we + * see a buffer to replay over the top of a remote attribute + * block we should simply do so. + */ + 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;