mirror of
https://github.com/psankar/simplefs.git
synced 2025-07-27 07:54:15 +02:00
simplefs_write: install h_sync (sync on close) for jbd2 handle
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
This commit is contained in:
parent
49937e8acf
commit
4c486f751b
1
simple.c
1
simple.c
@ -415,6 +415,7 @@ ssize_t simplefs_write(struct file * filp, const char __user * buf, size_t len,
|
|||||||
brelse(bh);
|
brelse(bh);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
handle->h_sync = 1;
|
||||||
retval = jbd2_journal_stop(handle);
|
retval = jbd2_journal_stop(handle);
|
||||||
if (WARN_ON(retval)) {
|
if (WARN_ON(retval)) {
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user