aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-08-09 11:22:17 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:01 -0400
commitd628eaef310533767ce68664873869c2d7f78f09 (patch)
tree12d6a9e6db000d89deb7ab01d55d2e7b9e6f42c5 /block/blk-core.c
parent36144077bce9f89763ce994bc631cbd1c9db7785 (diff)
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 b5776c1fd52a..a496727df7ef 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)
624 624
625 blk_rq_init(q, rq); 625 blk_rq_init(q, rq);
626 626
627 /*
628 * first three bits are identical in rq->cmd_flags and bio->bi_rw,
629 * see bio.h and blkdev.h
630 */
631 rq->cmd_flags = rw | REQ_ALLOCED; 627 rq->cmd_flags = rw | REQ_ALLOCED;
632 628
633 if (priv) { 629 if (priv) {
@@ -2012,7 +2008,8 @@ EXPORT_SYMBOL_GPL(blk_end_request_callback);
2012void blk_rq_bio_prep(struct request_queue *q, struct request *rq, 2008void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
2013 struct bio *bio) 2009 struct bio *bio)
2014{ 2010{
2015 /* first two bits are identical in rq->cmd_flags and bio->bi_rw */ 2011 /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw, and
2012 we want BIO_RW_AHEAD (bit 1) to imply REQ_FAILFAST (bit 1). */
2016 rq->cmd_flags |= (bio->bi_rw & 3); 2013 rq->cmd_flags |= (bio->bi_rw & 3);
2017 2014
2018 rq->nr_phys_segments = bio_phys_segments(q, bio); 2015 rq->nr_phys_segments = bio_phys_segments(q, bio);