diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-04-06 14:48:04 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-06 17:04:53 +0200 |
commit | 6c4bac6b3351fd278dc3537dae42f88f733ff12e (patch) | |
tree | 682fd65d652851a3a67a8994036dfb70be7b93c3 /fs/jbd | |
parent | block: fsync_buffers_list() should use SWRITE_SYNC_PLUG (diff) | |
download | linux-6c4bac6b3351fd278dc3537dae42f88f733ff12e.tar.xz linux-6c4bac6b3351fd278dc3537dae42f88f733ff12e.zip |
jbd: use WRITE_SYNC_PLUG instead of WRITE_SYNC
When you are going to be submitting several sync writes, we want to
give the IO scheduler a chance to merge some of them. Instead of
using the implicitly unplugging WRITE_SYNC variant, use WRITE_SYNC_PLUG
and rely on sync_buffer() doing the unplug when someone does a
wait_on_buffer()/lock_buffer().
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jbd')
-rw-r--r-- | fs/jbd/commit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index f8077b9c8981..a8e8513a78a9 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -351,8 +351,13 @@ void journal_commit_transaction(journal_t *journal) spin_lock(&journal->j_state_lock); commit_transaction->t_state = T_LOCKED; + /* + * Use plugged writes here, since we want to submit several before + * we unplug the device. We don't do explicit unplugging in here, + * instead we rely on sync_buffer() doing the unplug for us. + */ if (commit_transaction->t_synchronous_commit) - write_op = WRITE_SYNC; + write_op = WRITE_SYNC_PLUG; spin_lock(&commit_transaction->t_handle_lock); while (commit_transaction->t_updates) { DEFINE_WAIT(wait); |