提交 c90b07e8 编写于 作者: D Dave Chinner 提交者: Alex Elder

xfs: fix xfs_quiesce_data

We need to do a synchronous xfs_sync_fsdata to make sure the superblock
actually is on disk when we return.

Also remove SYNC_BDFLUSH flag to xfs_sync_inodes because that particular
flag is never checked.

Move xfs_filestream_flush call later to only release inodes after they
have been written out.
Signed-off-by: NDave Chinner <david@fromorbit.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NAlex Elder <aelder@sgi.com>
Signed-off-by: NAlex Elder <aelder@sgi.com>
上级 f9581b14
...@@ -419,14 +419,16 @@ xfs_quiesce_data( ...@@ -419,14 +419,16 @@ xfs_quiesce_data(
/* push non-blocking */ /* push non-blocking */
xfs_sync_data(mp, 0); xfs_sync_data(mp, 0);
xfs_qm_sync(mp, SYNC_TRYLOCK); xfs_qm_sync(mp, SYNC_TRYLOCK);
xfs_filestream_flush(mp);
/* push and block */ /* push and block till complete */
xfs_sync_data(mp, SYNC_WAIT); xfs_sync_data(mp, SYNC_WAIT);
xfs_qm_sync(mp, SYNC_WAIT); xfs_qm_sync(mp, SYNC_WAIT);
/* drop inode references pinned by filestreams */
xfs_filestream_flush(mp);
/* write superblock and hoover up shutdown errors */ /* write superblock and hoover up shutdown errors */
error = xfs_sync_fsdata(mp, 0); error = xfs_sync_fsdata(mp, SYNC_WAIT);
/* flush data-only devices */ /* flush data-only devices */
if (mp->m_rtdev_targp) if (mp->m_rtdev_targp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册