aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-03-17 10:51:40 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-03-17 10:51:40 +0100
commit4ee2491ed8569f370bf4c1a4c046a6efb8032bd2 (patch)
treebc59eedcaf0a889e7fac77414011aba22da3f500 /fs
parent9b6096a65f99a89dfd8328c4e469e7b53b3ae04a (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 42534f67d71..2e6b1a387b7 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -743,8 +743,10 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
struct list_head tmp;
struct address_space *mapping;
int err = 0, err2;
+ struct blk_plug plug;
INIT_LIST_HEAD(&tmp);
+ blk_start_plug(&plug);
spin_lock(lock);
while (!list_empty(list)) {
@@ -781,6 +783,10 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
}
}
+ spin_unlock(lock);
+ blk_finish_plug(&plug);
+ spin_lock(lock);
+
while (!list_empty(&tmp)) {
bh = BH_ENTRY(tmp.prev);
get_bh(bh);