diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2012-09-18 12:19:25 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-09-20 08:31:38 -0400 |
commit | e2a60da74fc8215c68509a89e9a69c66363153db (patch) | |
tree | c23dd6540dc211e2b2583c3e950a7f6977e3f1df /block/blk.h | |
parent | d41570b7469724005eb78448a69289900f911963 (diff) |
block: Clean up special command handling logic
Remove special-casing of non-rw fs style requests (discard). The nomerge
flags are consolidated in blk_types.h, and rq_mergeable() and
bio_mergeable() have been modified to use them.
bio_is_rw() is used in place of bio_has_data() a few places. This is
done to to distinguish true reads and writes from other fs type requests
that carry a payload (e.g. write same).
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/blk.h b/block/blk.h index 2a0ea32d249f..ca51543b248c 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -171,14 +171,13 @@ static inline int queue_congestion_off_threshold(struct request_queue *q) | |||
171 | * | 171 | * |
172 | * a) it's attached to a gendisk, and | 172 | * a) it's attached to a gendisk, and |
173 | * b) the queue had IO stats enabled when this request was started, and | 173 | * b) the queue had IO stats enabled when this request was started, and |
174 | * c) it's a file system request or a discard request | 174 | * c) it's a file system request |
175 | */ | 175 | */ |
176 | static inline int blk_do_io_stat(struct request *rq) | 176 | static inline int blk_do_io_stat(struct request *rq) |
177 | { | 177 | { |
178 | return rq->rq_disk && | 178 | return rq->rq_disk && |
179 | (rq->cmd_flags & REQ_IO_STAT) && | 179 | (rq->cmd_flags & REQ_IO_STAT) && |
180 | (rq->cmd_type == REQ_TYPE_FS || | 180 | (rq->cmd_type == REQ_TYPE_FS); |
181 | (rq->cmd_flags & REQ_DISCARD)); | ||
182 | } | 181 | } |
183 | 182 | ||
184 | /* | 183 | /* |