Skip to content

Commit

Permalink
simplefs_write: install h_sync (sync on close) for jbd2 handle
Browse files Browse the repository at this point in the history
This will make simplefs journaling more robust.

+ head -n100 /proc/fs/jbd2/loop0/info
7 transactions (7 requested), each up to 640 blocks
average:
  0ms waiting for transaction
  10ms request delay
  26ms running transaction
  0ms transaction was being locked
  0ms flushing data (in ordered mode)
  0ms logging transaction
  3459us average transaction commit time
  1 handles per transaction
  1 blocks per transaction
  2 logged blocks per transaction
  • Loading branch information
azat committed Oct 1, 2014
1 parent 49937e8 commit 4c486f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ ssize_t simplefs_write(struct file * filp, const char __user * buf, size_t len,
brelse(bh);
return retval;
}
handle->h_sync = 1;
retval = jbd2_journal_stop(handle);
if (WARN_ON(retval)) {
brelse(bh);
Expand Down

0 comments on commit 4c486f7

Please sign in to comment.