summaryrefslogtreecommitdiff
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-10-20 15:12:13 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit584d17b95953aaf5754d152ca8a203abef922ec3 (patch)
treeeac7c57dd4930d3f2d95ca4371a7dc9a6b1ea37b /block/blk-map.c
parent0d29a94140c40f1b8a8b371926bf45bddc5e49f1 (diff)
block: split out request-only flags into a new namespace
A lot of the REQ_* flags are only used on struct requests, and only of use to the block layer and a few drivers that dig into struct request internals. This patch adds a new req_flags_t rq_flags field to struct request for them, and thus dramatically shrinks the number of common requests. It also removes the unfortunate situation where we have to fit the fields from the same enum into 32 bits for struct bio and 64 bits for struct request. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Shaun Tancheff <shaun.tancheff@seagate.com> Signed-off-by: Jens Axboe <axboe@fb.com> (cherry picked from commit e806402130c9c494e22c73ae9ead4e79d2a5811c) Conflicts: drivers/mmc/core/block.c drivers/scsi/sd_zbc.c
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 54f9e15412f4..77eccfc013f2 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -138,7 +138,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
} while (iov_iter_count(&i));
if (!bio_flagged(bio, BIO_USER_MAPPED))
- rq->cmd_flags |= REQ_COPY_USER;
+ rq->rq_flags |= RQF_COPY_USER;
return 0;
unmap_rq:
@@ -249,7 +249,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
if (do_copy)
- rq->cmd_flags |= REQ_COPY_USER;
+ rq->rq_flags |= RQF_COPY_USER;
ret = blk_rq_append_bio(rq, bio);
if (unlikely(ret)) {