From: Brian Foster Date: Sat, 23 Jan 2021 00:48:24 +0000 (-0800) Subject: xfs: cover the log on freeze instead of cleaning it X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5b0ad7c2a52d4fdfec86a2c29096701783f46719;p=linux.git xfs: cover the log on freeze instead of cleaning it Filesystem freeze cleans the log and immediately redirties it so log recovery runs if a crash occurs after the filesystem is frozen. Now that log quiesce covers the log, there is no need to clean the log and redirty it to trigger log recovery because covering has the same effect. Update xfs_fs_freeze() to quiesce (and thus cover) the log. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index aedf622d221bb..aed74a3fc7876 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -889,8 +889,7 @@ xfs_fs_freeze( flags = memalloc_nofs_save(); xfs_stop_block_reaping(mp); xfs_save_resvblks(mp); - xfs_log_clean(mp); - ret = xfs_sync_sb(mp, true); + ret = xfs_log_quiesce(mp); memalloc_nofs_restore(flags); return ret; }