diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-11-13 17:36:07 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-11-13 17:36:07 +0000 |
commit | 6097a07411005c0184cf90256743c784079198fc (patch) | |
tree | 0c6496aa7de5f00a60ed8e7bac4b34f5acc7e30a /fs/xfs/xfs_log.c | |
parent | 6a872777ffff6184f4ac10bd71d926d5e6f2491e (diff) | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) |
Merge tag 'v3.7-rc5' into execve
Linux 3.7-rc5
Conflicts:
arch/arm64/kernel/process.c
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 7f4f9370d0e7..4dad756962d0 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -2387,14 +2387,27 @@ xlog_state_do_callback( /* - * update the last_sync_lsn before we drop the + * Completion of a iclog IO does not imply that + * a transaction has completed, as transactions + * can be large enough to span many iclogs. We + * cannot change the tail of the log half way + * through a transaction as this may be the only + * transaction in the log and moving th etail to + * point to the middle of it will prevent + * recovery from finding the start of the + * transaction. Hence we should only update the + * last_sync_lsn if this iclog contains + * transaction completion callbacks on it. + * + * We have to do this before we drop the * icloglock to ensure we are the only one that * can update it. */ ASSERT(XFS_LSN_CMP(atomic64_read(&log->l_last_sync_lsn), be64_to_cpu(iclog->ic_header.h_lsn)) <= 0); - atomic64_set(&log->l_last_sync_lsn, - be64_to_cpu(iclog->ic_header.h_lsn)); + if (iclog->ic_callback) + atomic64_set(&log->l_last_sync_lsn, + be64_to_cpu(iclog->ic_header.h_lsn)); } else ioerrors++; |