This adds the io_batch structure, and a helper for defining one on the stack. It's meant to be used for collecting requests for completion, with a completion handler defined to be called at the end. Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> --- include/linux/blkdev.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2a8689e949b4..b39b19dbe7b6 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1298,4 +1298,14 @@ int fsync_bdev(struct block_device *bdev); int freeze_bdev(struct block_device *bdev); int thaw_bdev(struct block_device *bdev); +struct io_batch { + struct request *req_list; + void (*complete)(struct io_batch *); +}; + +#define DEFINE_IO_BATCH(name) \ + struct io_batch name = { \ + .req_list = NULL \ + } + #endif /* _LINUX_BLKDEV_H */ -- 2.33.0