summaryrefslogtreecommitdiffstats
path: root/include/linux/blk_types.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-07-19 11:28:43 +0200
committerJens Axboe <axboe@fb.com>2016-07-20 17:37:04 -0600
commitc0acf12a50c2b6cbaf72bdfe2b1b514c369a83c5 (patch)
tree1ff860936eceb0fd4a81de799bda51f7617a75fa /include/linux/blk_types.h
parented996a52c868b62c4e5bf529cb4ccb44bcfa2f8e (diff)
downloadop-kernel-dev-c0acf12a50c2b6cbaf72bdfe2b1b514c369a83c5.zip
op-kernel-dev-c0acf12a50c2b6cbaf72bdfe2b1b514c369a83c5.tar.gz
block: shrink bio size again
The recent ops split grew the bio by adding the new ioprio field. Shrink it again by using a 16-bit field for the bi_flags value and filling the holes near the beginning of the structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blk_types.h')
-rw-r--r--include/linux/blk_types.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index b76463e..c3525c5 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -46,11 +46,11 @@ struct bvec_iter {
struct bio {
struct bio *bi_next; /* request queue link */
struct block_device *bi_bdev;
- unsigned int bi_flags; /* status, command, etc */
int bi_error;
unsigned int bi_rw; /* bottom bits req flags,
* top bits REQ_OP
*/
+ unsigned short bi_flags; /* status, command, etc */
unsigned short bi_ioprio;
struct bvec_iter bi_iter;
@@ -136,7 +136,7 @@ struct bio {
* Flags starting here get preserved by bio_reset() - this includes
* BVEC_POOL_IDX()
*/
-#define BIO_RESET_BITS 13
+#define BIO_RESET_BITS 10
/*
* We support 6 different bvec pools, the last one is magic in that it
@@ -151,7 +151,7 @@ struct bio {
* freed.
*/
#define BVEC_POOL_BITS (4)
-#define BVEC_POOL_OFFSET (32 - BVEC_POOL_BITS)
+#define BVEC_POOL_OFFSET (16 - BVEC_POOL_BITS)
#define BVEC_POOL_IDX(bio) ((bio)->bi_flags >> BVEC_POOL_OFFSET)
#endif /* CONFIG_BLOCK */
OpenPOWER on IntegriCloud