diff options
| -rw-r--r-- | fs/xfs/xfs_log.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 027ebfe20677..5215abc8023a 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
| @@ -3688,6 +3688,11 @@ xlog_state_ioerror( | |||
| 3688 | * c. nothing new gets queued up after (a) and (b) are done. | 3688 | * c. nothing new gets queued up after (a) and (b) are done. |
| 3689 | * d. if !logerror, flush the iclogs to disk, then seal them off | 3689 | * d. if !logerror, flush the iclogs to disk, then seal them off |
| 3690 | * for business. | 3690 | * for business. |
| 3691 | * | ||
| 3692 | * Note: for delayed logging the !logerror case needs to flush the regions | ||
| 3693 | * held in memory out to the iclogs before flushing them to disk. This needs | ||
| 3694 | * to be done before the log is marked as shutdown, otherwise the flush to the | ||
| 3695 | * iclogs will fail. | ||
| 3691 | */ | 3696 | */ |
| 3692 | int | 3697 | int |
| 3693 | xfs_log_force_umount( | 3698 | xfs_log_force_umount( |
| @@ -3721,6 +3726,16 @@ xfs_log_force_umount( | |||
| 3721 | return 1; | 3726 | return 1; |
| 3722 | } | 3727 | } |
| 3723 | retval = 0; | 3728 | retval = 0; |
| 3729 | |||
| 3730 | /* | ||
| 3731 | * Flush the in memory commit item list before marking the log as | ||
| 3732 | * being shut down. We need to do it in this order to ensure all the | ||
| 3733 | * completed transactions are flushed to disk with the xfs_log_force() | ||
| 3734 | * call below. | ||
| 3735 | */ | ||
| 3736 | if (!logerror && (mp->m_flags & XFS_MOUNT_DELAYLOG)) | ||
| 3737 | xlog_cil_push(log, 1); | ||
| 3738 | |||
| 3724 | /* | 3739 | /* |
| 3725 | * We must hold both the GRANT lock and the LOG lock, | 3740 | * We must hold both the GRANT lock and the LOG lock, |
| 3726 | * before we mark the filesystem SHUTDOWN and wake | 3741 | * before we mark the filesystem SHUTDOWN and wake |
