Skip to content

Commit 4ee2491

Browse files
author
Jens Axboe
committed
fs: make fsync_buffers_list() plug
It used WRITE_SYNC_PLUG before and potentially submits a batch of IO, so lets enable plugging for this case. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
1 parent 9b6096a commit 4ee2491

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎fs/buffer.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,10 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
743743
struct list_head tmp;
744744
struct address_space *mapping;
745745
int err = 0, err2;
746+
struct blk_plug plug;
746747

747748
INIT_LIST_HEAD(&tmp);
749+
blk_start_plug(&plug);
748750

749751
spin_lock(lock);
750752
while (!list_empty(list)) {
@@ -781,6 +783,10 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
781783
}
782784
}
783785

786+
spin_unlock(lock);
787+
blk_finish_plug(&plug);
788+
spin_lock(lock);
789+
784790
while (!list_empty(&tmp)) {
785791
bh = BH_ENTRY(tmp.prev);
786792
get_bh(bh);

0 commit comments

Comments
 (0)