]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/blk_types.h
block, aio: batch completion for bios/kiocbs
[karo-tx-linux.git] / include / linux / blk_types.h
index cdf11191e6450fa680b7a8b71352c3642633b9fb..d4e7bab9a17ea4125eb55972598c36aae3a9f1c7 100644 (file)
@@ -16,7 +16,9 @@ struct page;
 struct block_device;
 struct io_context;
 struct cgroup_subsys_state;
+struct batch_complete;
 typedef void (bio_end_io_t) (struct bio *, int);
+typedef void (bio_batch_end_io_t) (struct bio *, int, struct batch_complete *);
 typedef void (bio_destructor_t) (struct bio *);
 
 /*
@@ -42,6 +44,7 @@ struct bio {
                                                 * top bits priority
                                                 */
 
+       short                   bi_error;
        unsigned short          bi_vcnt;        /* how many bio_vec's */
        unsigned short          bi_idx;         /* current index into bvl_vec */
 
@@ -59,7 +62,10 @@ struct bio {
        unsigned int            bi_seg_front_size;
        unsigned int            bi_seg_back_size;
 
-       bio_end_io_t            *bi_end_io;
+       union {
+               bio_end_io_t    *bi_end_io;
+               bio_batch_end_io_t *bi_batch_end_io;
+       };
 
        void                    *bi_private;
 #ifdef CONFIG_BLK_CGROUP
@@ -111,12 +117,13 @@ struct bio {
 #define BIO_FS_INTEGRITY 9     /* fs owns integrity data, not block layer */
 #define BIO_QUIET      10      /* Make BIO Quiet */
 #define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */
+#define BIO_BATCH_ENDIO        12
 
 /*
  * Flags starting here get preserved by bio_reset() - this includes
  * BIO_POOL_IDX()
  */
-#define BIO_RESET_BITS 12
+#define BIO_RESET_BITS 13
 
 #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))