]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/blk_types.h
bio: skip atomic inc/dec of ->bi_cnt for most use cases
[mirror_ubuntu-zesty-kernel.git] / include / linux / blk_types.h
index a1b25e35ea5f9fc2978b7f62917c6b4e39c3dc75..93d2e715381695baaf6fde81ad5937efffc94d4b 100644 (file)
@@ -65,7 +65,7 @@ struct bio {
        unsigned int            bi_seg_front_size;
        unsigned int            bi_seg_back_size;
 
-       atomic_t                bi_remaining;
+       atomic_t                __bi_remaining;
 
        bio_end_io_t            *bi_end_io;
 
@@ -92,7 +92,7 @@ struct bio {
 
        unsigned short          bi_max_vecs;    /* max bvl_vecs we can hold */
 
-       atomic_t                bi_cnt;         /* pin count */
+       atomic_t                __bi_cnt;       /* pin count */
 
        struct bio_vec          *bi_io_vec;     /* the actual vec list */
 
@@ -122,6 +122,8 @@ struct bio {
 #define BIO_NULL_MAPPED 8      /* contains invalid user pages */
 #define BIO_QUIET      9       /* Make BIO Quiet */
 #define BIO_SNAP_STABLE        10      /* bio data must be snapshotted during write */
+#define BIO_CHAIN      11      /* chained bio, ->bi_remaining in effect */
+#define BIO_REFFED     12      /* bio has elevated ->bi_cnt */
 
 /*
  * Flags starting here get preserved by bio_reset() - this includes