fs: make aio plug
authorShaohua Li <shaohua.li@intel.com>
Thu, 1 Jul 2010 05:55:01 +0000 (07:55 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 10 Mar 2011 07:52:27 +0000 (08:52 +0100)
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fs/aio.c

index c5ea494ea9e248a7c82b9bf98a967df9f430221f..1476bed1c5fbd0325bd6b18a989e4b5b67439387 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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);