summaryrefslogtreecommitdiff
path: root/include/linux/jbd.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-04-07 11:05:19 +0200
committerJan Kara <jack@suse.cz>2012-05-15 23:34:37 +0200
commitfd2cbd4dfa3db477dd6226d387d3f1911d36a6a9 (patch)
treeb0ada946d14cdcf5db6da2d177be9590a3449e9a /include/linux/jbd.h
parent1ce8486dcc00c1e095af8d155fa4451936b89013 (diff)
downloadlinux-3.10-fd2cbd4dfa3db477dd6226d387d3f1911d36a6a9.tar.gz
linux-3.10-fd2cbd4dfa3db477dd6226d387d3f1911d36a6a9.tar.bz2
linux-3.10-fd2cbd4dfa3db477dd6226d387d3f1911d36a6a9.zip
jbd: Write journal superblock with WRITE_FUA after checkpointing
If journal superblock is written only in disk's caches and other transaction starts reusing space of the transaction cleaned from the log, it can happen blocks of a new transaction reach the disk before journal superblock. When power failure happens in such case, subsequent journal replay would still try to replay the old transaction but some of it's blocks may be already overwritten by the new transaction. For this reason we must use WRITE_FUA when updating log tail and we must first write new log tail to disk and update in-memory information only after that. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/jbd.h')
-rw-r--r--include/linux/jbd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index 9716d370c50..c8f32975f0e 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -864,7 +864,8 @@ extern int journal_destroy (journal_t *);
extern int journal_recover (journal_t *journal);
extern int journal_wipe (journal_t *, int);
extern int journal_skip_recovery (journal_t *);
-extern void journal_update_sb_log_tail (journal_t *);
+extern void journal_update_sb_log_tail (journal_t *, tid_t, unsigned int,
+ int);
extern void journal_abort (journal_t *, int);
extern int journal_errno (journal_t *);
extern void journal_ack_err (journal_t *);