summaryrefslogtreecommitdiff
path: root/fs/jbd2/transaction.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-01-03 20:27:38 -0500
committerTheodore Ts'o <tytso@mit.edu>2009-01-03 20:27:38 -0500
commit30773840c19cea60dcef39545960d541b1ac1cf8 (patch)
treef220a2dce451a40dc7264e8fd70c77c5a3908873 /fs/jbd2/transaction.c
parentd7cfa4684d82f58e5d7cb73b8a3c88c169937f25 (diff)
downloadlinux-3.10-30773840c19cea60dcef39545960d541b1ac1cf8.tar.gz
linux-3.10-30773840c19cea60dcef39545960d541b1ac1cf8.tar.bz2
linux-3.10-30773840c19cea60dcef39545960d541b1ac1cf8.zip
ext4: add fsync batch tuning knobs
Add new mount options, min_batch_time and max_batch_time, which controls how long the jbd2 layer should wait for additional filesystem operations to get batched with a synchronous write transaction. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2/transaction.c')
-rw-r--r--fs/jbd2/transaction.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 13dcbc990f4..48c21bac5a5 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1255,8 +1255,10 @@ int jbd2_journal_stop(handle_t *handle)
trans_time = ktime_to_ns(ktime_sub(ktime_get(),
transaction->t_start_time));
+ commit_time = max_t(u64, commit_time,
+ 1000*journal->j_min_batch_time);
commit_time = min_t(u64, commit_time,
- 1000*jiffies_to_usecs(1));
+ 1000*journal->j_max_batch_time);
if (trans_time < commit_time) {
ktime_t expires = ktime_add_ns(ktime_get(),