From: Christoph Hellwig Date: Thu, 5 Feb 2015 00:13:21 +0000 (+1100) Subject: xfs: growfs should use synchronous transactions X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f8079b850c9e130423829c919f3c0802e677099d;p=linux.git xfs: growfs should use synchronous transactions Growfs updates the secondary superblocks using synchronous unlogged buffer writes after committing the updates to the primary superblock. Mark the transaction to the primary superblock as synchronous so that we guarantee it is committed to disk before we update the secondary superblocks. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index f7114527cd2f8..fba6532efba44 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -488,6 +488,7 @@ xfs_growfs_data_private( xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, nfree); if (dpct) xfs_trans_mod_sb(tp, XFS_TRANS_SB_IMAXPCT, dpct); + xfs_trans_set_sync(tp); error = xfs_trans_commit(tp, 0); if (error) return error;