From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To: axboe@suse.de, james.bottomley@steeleye.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 4/6] block layer: use blk_rq_bio_prep in init_request_from_bio
Date: Fri, 10 Mar 2006 20:47:05 +0900 [thread overview]
Message-ID: <20060310204705Q.tomof@acm.org> (raw)
Patch to use blk_rq_bio_prep in init_request_from_bio. And remove
blk_rq_bio_prep's flags copying. The first three bits have not been
the same for some time so that has been broken. The user of
blk_rq_bio_prep will setup the request flags so if it wanted failfast
or to be a barrier it will set the correct flag itself.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
block/ll_rw_blk.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
a0f146d5293039d720f6cc38ef30eff1713e8758
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 13c40a0..da2c57d 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -2765,16 +2765,12 @@ static void init_request_from_bio(struct
req->errors = 0;
req->hard_sector = req->sector = bio->bi_sector;
- req->hard_nr_sectors = req->nr_sectors = bio_sectors(bio);
- req->current_nr_sectors = req->hard_cur_sectors = bio_cur_sectors(bio);
- req->nr_phys_segments = bio_phys_segments(req->q, bio);
- req->nr_hw_segments = bio_hw_segments(req->q, bio);
- req->buffer = bio_data(bio); /* see ->buffer comment above */
req->waiting = NULL;
- req->bio = req->biotail = bio;
req->ioprio = bio_prio(bio);
req->rq_disk = bio->bi_bdev->bd_disk;
req->start_time = jiffies;
+
+ blk_rq_bio_prep(req->q, req, bio);
}
static int __make_request(request_queue_t *q, struct bio *bio)
@@ -3403,9 +3399,6 @@ EXPORT_SYMBOL(end_request);
void blk_rq_bio_prep(request_queue_t *q, struct request *rq, struct bio *bio)
{
- /* first three bits are identical in rq->flags and bio->bi_rw */
- rq->flags |= (bio->bi_rw & 7);
-
rq->nr_phys_segments = bio_phys_segments(q, bio);
rq->nr_hw_segments = bio_hw_segments(q, bio);
rq->current_nr_sectors = bio_cur_sectors(bio);
--
1.1.5
reply other threads:[~2006-03-10 11:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060310204705Q.tomof@acm.org \
--to=fujita.tomonori@lab.ntt.co.jp \
--cc=axboe@suse.de \
--cc=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.