diff options
author | Christoph Hellwig <hch@lst.de> | 2017-01-31 10:57:29 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-31 16:00:34 -0500 |
commit | 57292b58ddb58689e8c3b4c6eadbef10d9ca44dd (patch) | |
tree | dd6e5af538b2f2684d2090781f668c7099a0455e /include/linux/blktrace_api.h | |
parent | 09fc54ccc42744669e748434af5c2f8adcad900f (diff) |
block: introduce blk_rq_is_passthrough
This can be used to check for fs vs non-fs requests and basically
removes all knowledge of BLOCK_PC specific from the block layer,
as well as preparing for removing the cmd_type field in struct request.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blktrace_api.h')
-rw-r--r-- | include/linux/blktrace_api.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index a143a67a6f33..341f9418bd68 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -114,12 +114,12 @@ extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes); | |||
114 | 114 | ||
115 | static inline sector_t blk_rq_trace_sector(struct request *rq) | 115 | static inline sector_t blk_rq_trace_sector(struct request *rq) |
116 | { | 116 | { |
117 | return (rq->cmd_type != REQ_TYPE_FS) ? 0 : blk_rq_pos(rq); | 117 | return blk_rq_is_passthrough(rq) ? 0 : blk_rq_pos(rq); |
118 | } | 118 | } |
119 | 119 | ||
120 | static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq) | 120 | static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq) |
121 | { | 121 | { |
122 | return (rq->cmd_type != REQ_TYPE_FS) ? 0 : blk_rq_sectors(rq); | 122 | return blk_rq_is_passthrough(rq) ? 0 : blk_rq_sectors(rq); |
123 | } | 123 | } |
124 | 124 | ||
125 | #endif | 125 | #endif |