summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-08-09 16:22:17 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:01 +0200
commitd628eaef310533767ce68664873869c2d7f78f09 (patch)
tree12d6a9e6db000d89deb7ab01d55d2e7b9e6f42c5 /block/blk-core.c
parent36144077bce9f89763ce994bc631cbd1c9db7785 (diff)
downloadop-kernel-dev-d628eaef310533767ce68664873869c2d7f78f09.zip
op-kernel-dev-d628eaef310533767ce68664873869c2d7f78f09.tar.gz
Fix up comments about matching flags between bio and rq
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index b5776c1..a496727 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -624,10 +624,6 @@ blk_alloc_request(struct request_queue *q, int rw, int priv, gfp_t gfp_mask)
blk_rq_init(q, rq);
- /*
- * first three bits are identical in rq->cmd_flags and bio->bi_rw,
- * see bio.h and blkdev.h
- */
rq->cmd_flags = rw | REQ_ALLOCED;
if (priv) {
@@ -2012,7 +2008,8 @@ EXPORT_SYMBOL_GPL(blk_end_request_callback);
void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
struct bio *bio)
{
- /* first two bits are identical in rq->cmd_flags and bio->bi_rw */
+ /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw, and
+ we want BIO_RW_AHEAD (bit 1) to imply REQ_FAILFAST (bit 1). */
rq->cmd_flags |= (bio->bi_rw & 3);
rq->nr_phys_segments = bio_phys_segments(q, bio);
OpenPOWER on IntegriCloud