diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2013-08-12 11:43:45 +0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-08-12 11:43:45 +0400 |
| commit | cada23f308e3869ceb5c75f164d249448dfaec07 (patch) | |
| tree | 97c7aebcad0eb2a93a7519251a01f5be9255ee75 /fs/xfs/xfs_log_recover.c | |
| parent | e769ece3b129698d2b09811a6f6d304e4eaa8c29 (diff) | |
| parent | 6c8c0c4dc0e98ee2191211d66e9f876e95787073 (diff) | |
| download | linux-cada23f308e3869ceb5c75f164d249448dfaec07.tar.xz | |
Merge branch 'kvm-arm64/fixes-3.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into kvm-master
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
| -rw-r--r-- | fs/xfs/xfs_log_recover.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 6fcc910a50b9..7681b19aa5dc 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2592,8 +2592,16 @@ xlog_recover_inode_pass2( goto error; } - /* Skip replay when the on disk inode is newer than the log one */ - if (dicp->di_flushiter < be16_to_cpu(dip->di_flushiter)) { + /* + * di_flushiter is only valid for v1/2 inodes. All changes for v3 inodes + * are transactional and if ordering is necessary we can determine that + * more accurately by the LSN field in the V3 inode core. Don't trust + * the inode versions we might be changing them here - use the + * superblock flag to determine whether we need to look at di_flushiter + * to skip replay when the on disk inode is newer than the log one + */ + if (!xfs_sb_version_hascrc(&mp->m_sb) && + dicp->di_flushiter < be16_to_cpu(dip->di_flushiter)) { /* * Deal with the wrap case, DI_MAX_FLUSH is less * than smaller numbers @@ -2608,6 +2616,7 @@ xlog_recover_inode_pass2( goto error; } } + /* Take the opportunity to reset the flush iteration count */ dicp->di_flushiter = 0; |
