block: remove wrappers for request type/flags
Remove all the trivial wrappers for the cmd_type and cmd_flags fields in
struct requests. This allows much easier grepping for different request
types instead of unwinding through macros.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 638711c..4f14994 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -661,10 +661,10 @@
if (likely(!bt))
return;
- if (blk_discard_rq(rq))
+ if (rq->cmd_flags & REQ_DISCARD)
rw |= (1 << BIO_RW_DISCARD);
- if (blk_pc_request(rq)) {
+ if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
what |= BLK_TC_ACT(BLK_TC_PC);
__blk_add_trace(bt, 0, blk_rq_bytes(rq), rw,
what, rq->errors, rq->cmd_len, rq->cmd);
@@ -925,7 +925,7 @@
if (likely(!bt))
return;
- if (blk_pc_request(rq))
+ if (rq->cmd_type == REQ_TYPE_BLOCK_PC)
__blk_add_trace(bt, 0, blk_rq_bytes(rq), 0,
BLK_TA_DRV_DATA, rq->errors, len, data);
else
@@ -1730,7 +1730,7 @@
int len = rq->cmd_len;
unsigned char *cmd = rq->cmd;
- if (!blk_pc_request(rq)) {
+ if (rq->cmd_type != REQ_TYPE_BLOCK_PC) {
buf[0] = '\0';
return;
}
@@ -1779,7 +1779,7 @@
int rw = rq->cmd_flags & 0x03;
int bytes;
- if (blk_discard_rq(rq))
+ if (rq->cmd_flags & REQ_DISCARD)
rw |= (1 << BIO_RW_DISCARD);
bytes = blk_rq_bytes(rq);