block: shrink struct bio down to 2 cache lines again
[cascardo/linux.git] / include / linux / blk_types.h
index 7303b34..4b7b4eb 100644 (file)
@@ -14,7 +14,7 @@ struct page;
 struct block_device;
 struct io_context;
 struct cgroup_subsys_state;
-typedef void (bio_end_io_t) (struct bio *, int);
+typedef void (bio_end_io_t) (struct bio *);
 typedef void (bio_destructor_t) (struct bio *);
 
 /*
@@ -46,7 +46,8 @@ struct bvec_iter {
 struct bio {
        struct bio              *bi_next;       /* request queue link */
        struct block_device     *bi_bdev;
-       unsigned long           bi_flags;       /* status, command, etc */
+       unsigned int            bi_flags;       /* status, command, etc */
+       int                     bi_error;
        unsigned long           bi_rw;          /* bottom bits READ/WRITE,
                                                 * top bits priority
                                                 */
@@ -111,7 +112,6 @@ struct bio {
 /*
  * bio flags
  */
-#define BIO_UPTODATE   0       /* ok after I/O completion */
 #define BIO_SEG_VALID  1       /* bi_phys_segments valid */
 #define BIO_CLONED     2       /* doesn't own data */
 #define BIO_BOUNCED    3       /* bio is a bounce bio */
@@ -129,14 +129,12 @@ struct bio {
 #define BIO_RESET_BITS 13
 #define BIO_OWNS_VEC   13      /* bio_free() should free bvec */
 
-#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
-
 /*
  * top 4 bits of bio flags indicate the pool this bio came from
  */
 #define BIO_POOL_BITS          (4)
 #define BIO_POOL_NONE          ((1UL << BIO_POOL_BITS) - 1)
-#define BIO_POOL_OFFSET                (BITS_PER_LONG - BIO_POOL_BITS)
+#define BIO_POOL_OFFSET                (32 - BIO_POOL_BITS)
 #define BIO_POOL_MASK          (1UL << BIO_POOL_OFFSET)
 #define BIO_POOL_IDX(bio)      ((bio)->bi_flags >> BIO_POOL_OFFSET)