summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2015-01-21 23:20:53 +0100
committerDave Chinner <david@fromorbit.com>2015-01-21 23:20:53 +0100
commit465e2def7cb45864da1f82afb973a6acd1046ed8 (patch)
treed085a45f4575a8ea31d128626c4f1f650cf9d54a /fs/xfs/xfs_log.c
parentMerge branch 'xfs-misc-fixes-for-3.20-2' into for-next (diff)
parentxfs: sanitise sb_bad_features2 handling (diff)
downloadlinux-465e2def7cb45864da1f82afb973a6acd1046ed8.tar.xz
linux-465e2def7cb45864da1f82afb973a6acd1046ed8.zip
Merge branch 'xfs-sb-logging-rework' into for-next
Conflicts: fs/xfs/xfs_mount.c
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 8fbbfb2d46e1..bcc7cfabb787 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -33,6 +33,7 @@
#include "xfs_fsops.h"
#include "xfs_cksum.h"
#include "xfs_sysfs.h"
+#include "xfs_sb.h"
kmem_zone_t *xfs_log_ticket_zone;
@@ -1290,9 +1291,20 @@ xfs_log_worker(
struct xfs_mount *mp = log->l_mp;
/* dgc: errors ignored - not fatal and nowhere to report them */
- if (xfs_log_need_covered(mp))
- xfs_fs_log_dummy(mp);
- else
+ if (xfs_log_need_covered(mp)) {
+ /*
+ * Dump a transaction into the log that contains no real change.
+ * This is needed to stamp the current tail LSN into the log
+ * during the covering operation.
+ *
+ * We cannot use an inode here for this - that will push dirty
+ * state back up into the VFS and then periodic inode flushing
+ * will prevent log covering from making progress. Hence we
+ * synchronously log the superblock instead to ensure the
+ * superblock is immediately unpinned and can be written back.
+ */
+ xfs_sync_sb(mp, true);
+ } else
xfs_log_force(mp, 0);
/* start pushing all the metadata that is currently dirty */