summaryrefslogtreecommitdiff
path: root/block/blk-lib.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-10-28 17:48:16 +0300
committerJens Axboe <axboe@fb.com>2016-10-28 17:48:16 +0300
commitef295ecf090d3e86e5b742fc6ab34f1122a43773 (patch)
treee52e8be789b5654dfc43f626c50261f80615c03f /block/blk-lib.c
parente806402130c9c494e22c73ae9ead4e79d2a5811c (diff)
downloadlinux-ef295ecf090d3e86e5b742fc6ab34f1122a43773.tar.xz
block: better op and flags encoding
Now that we don't need the common flags to overflow outside the range of a 32-bit type we can encode them the same way for both the bio and request fields. This in addition allows us to place the operation first (and make some room for more ops while we're at it) and to stop having to shift around the operation values. In addition this allows passing around only one value in the block layer instead of two (and eventuall also in the file systems, but we can do that later) and thus clean up a lot of code. Last but not least this allows decreasing the size of the cmd_flags field in struct request to 32-bits. Various functions passing this value could also be updated, but I'd like to avoid the churn for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r--block/blk-lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 46fe9248410d..18abda862915 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -29,7 +29,7 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
struct request_queue *q = bdev_get_queue(bdev);
struct bio *bio = *biop;
unsigned int granularity;
- enum req_op op;
+ unsigned int op;
int alignment;
sector_t bs_mask;