Commit 4ee2491ed8569f370bf4c1a4c046a6efb8032bd2

Authored by Jens Axboe
1 parent 9b6096a65f

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>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

... ... @@ -743,8 +743,10 @@
743 743 struct list_head tmp;
744 744 struct address_space *mapping;
745 745 int err = 0, err2;
  746 + struct blk_plug plug;
746 747  
747 748 INIT_LIST_HEAD(&tmp);
  749 + blk_start_plug(&plug);
748 750  
749 751 spin_lock(lock);
750 752 while (!list_empty(list)) {
... ... @@ -780,6 +782,10 @@
780 782 }
781 783 }
782 784 }
  785 +
  786 + spin_unlock(lock);
  787 + blk_finish_plug(&plug);
  788 + spin_lock(lock);
783 789  
784 790 while (!list_empty(&tmp)) {
785 791 bh = BH_ENTRY(tmp.prev);