提交 9f5b9425 编写于 作者: S Shaohua Li 提交者: Jens Axboe

fs: make aio plug

Signed-off-by: NShaohua Li <shaohua.li@intel.com>
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 2ed1a6bc
......@@ -1660,6 +1660,7 @@ long do_io_submit(aio_context_t ctx_id, long nr,
long ret = 0;
int i;
struct hlist_head batch_hash[AIO_BATCH_HASH_SIZE] = { { 0, }, };
struct blk_plug plug;
if (unlikely(nr < 0))
return -EINVAL;
......@@ -1676,6 +1677,8 @@ long do_io_submit(aio_context_t ctx_id, long nr,
return -EINVAL;
}
blk_start_plug(&plug);
/*
* AKPM: should this return a partial result if some of the IOs were
* successfully submitted?
......@@ -1698,6 +1701,7 @@ long do_io_submit(aio_context_t ctx_id, long nr,
if (ret)
break;
}
blk_finish_plug(&plug);
aio_batch_free(batch_hash);
put_ioctx(ctx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册