summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-06-24 14:39:34 +0200
committerJens Axboe <axboe@kernel.dk>2021-06-30 15:34:19 -0600
commitda6269da4cfe29f484e8fd27c1496b81b47e2499 (patch)
tree85adbc95654baa1376592134950ecb466fed8769 /include/linux/blkdev.h
parent5ec780a6eddacbbbc1c5d5838753c3ca43f93526 (diff)
block: remove REQ_OP_SCSI_{IN,OUT}
With the legacy IDE driver gone drivers now use either REQ_OP_DRV_* or REQ_OP_SCSI_*, so unify the two concepts of passthrough requests into a single one. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h33
1 files changed, 3 insertions, 30 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index d66d0da72529..d199e51524eb 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -240,42 +240,15 @@ struct request {
void *end_io_data;
};
-static inline bool blk_op_is_scsi(unsigned int op)
-{
- return op == REQ_OP_SCSI_IN || op == REQ_OP_SCSI_OUT;
-}
-
-static inline bool blk_op_is_private(unsigned int op)
+static inline bool blk_op_is_passthrough(unsigned int op)
{
+ op &= REQ_OP_MASK;
return op == REQ_OP_DRV_IN || op == REQ_OP_DRV_OUT;
}
-static inline bool blk_rq_is_scsi(struct request *rq)
-{
- return blk_op_is_scsi(req_op(rq));
-}
-
-static inline bool blk_rq_is_private(struct request *rq)
-{
- return blk_op_is_private(req_op(rq));
-}
-
static inline bool blk_rq_is_passthrough(struct request *rq)
{
- return blk_rq_is_scsi(rq) || blk_rq_is_private(rq);
-}
-
-static inline bool bio_is_passthrough(struct bio *bio)
-{
- unsigned op = bio_op(bio);
-
- return blk_op_is_scsi(op) || blk_op_is_private(op);
-}
-
-static inline bool blk_op_is_passthrough(unsigned int op)
-{
- return (blk_op_is_scsi(op & REQ_OP_MASK) ||
- blk_op_is_private(op & REQ_OP_MASK));
+ return blk_op_is_passthrough(req_op(rq));
}
static inline unsigned short req_get_ioprio(struct request *req)