diff options
author | Christoph Hellwig <hch@lst.de> | 2010-08-07 12:17:56 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:17:56 -0400 |
commit | 33659ebbae262228eef4e0fe990f393d1f0ed941 (patch) | |
tree | fcb537f09359c8dad3a6f6e16dc4319562dc42cc /block/blk-barrier.c | |
parent | 7e005f79791dcd58436c88ded4a7f5aed1b82147 (diff) |
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>
Diffstat (limited to 'block/blk-barrier.c')
-rw-r--r-- | block/blk-barrier.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index 0d710c9d403b..74e404393172 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c | |||
@@ -79,7 +79,7 @@ unsigned blk_ordered_req_seq(struct request *rq) | |||
79 | * | 79 | * |
80 | * http://thread.gmane.org/gmane.linux.kernel/537473 | 80 | * http://thread.gmane.org/gmane.linux.kernel/537473 |
81 | */ | 81 | */ |
82 | if (!blk_fs_request(rq)) | 82 | if (rq->cmd_type != REQ_TYPE_FS) |
83 | return QUEUE_ORDSEQ_DRAIN; | 83 | return QUEUE_ORDSEQ_DRAIN; |
84 | 84 | ||
85 | if ((rq->cmd_flags & REQ_ORDERED_COLOR) == | 85 | if ((rq->cmd_flags & REQ_ORDERED_COLOR) == |
@@ -236,7 +236,8 @@ static inline bool start_ordered(struct request_queue *q, struct request **rqp) | |||
236 | bool blk_do_ordered(struct request_queue *q, struct request **rqp) | 236 | bool blk_do_ordered(struct request_queue *q, struct request **rqp) |
237 | { | 237 | { |
238 | struct request *rq = *rqp; | 238 | struct request *rq = *rqp; |
239 | const int is_barrier = blk_fs_request(rq) && blk_barrier_rq(rq); | 239 | const int is_barrier = rq->cmd_type == REQ_TYPE_FS && |
240 | (rq->cmd_flags & REQ_HARDBARRIER); | ||
240 | 241 | ||
241 | if (!q->ordseq) { | 242 | if (!q->ordseq) { |
242 | if (!is_barrier) | 243 | if (!is_barrier) |
@@ -261,7 +262,7 @@ bool blk_do_ordered(struct request_queue *q, struct request **rqp) | |||
261 | */ | 262 | */ |
262 | 263 | ||
263 | /* Special requests are not subject to ordering rules. */ | 264 | /* Special requests are not subject to ordering rules. */ |
264 | if (!blk_fs_request(rq) && | 265 | if (rq->cmd_type != REQ_TYPE_FS && |
265 | rq != &q->pre_flush_rq && rq != &q->post_flush_rq) | 266 | rq != &q->pre_flush_rq && rq != &q->post_flush_rq) |
266 | return true; | 267 | return true; |
267 | 268 | ||