From: NeilBrown <neilb@suse.de>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org, Tejun Heo <htejun@gmail.com>
Subject: [PATCH 006 of 6] Share code between init_request_from_bio and blk_rq_bio_prep
Date: Thu, 16 Aug 2007 21:21:27 +1000 [thread overview]
Message-ID: <1070816112127.12245@suse.de> (raw)
In-Reply-To: 20070816211551.11839.patches@notabene
These have very similar functions and should share code where
possible.
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./block/ll_rw_blk.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
--- .prev/block/ll_rw_blk.c 2007-08-16 21:10:55.000000000 +1000
+++ ./block/ll_rw_blk.c 2007-08-16 21:11:03.000000000 +1000
@@ -2932,15 +2932,9 @@ 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->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(struct request_queue *q, struct bio *bio)
next prev parent reply other threads:[~2007-08-16 11:23 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 11:20 [PATCH 000 of 6] A few block-layer tidy-up patches NeilBrown
2007-08-16 11:20 ` [PATCH 001 of 6] Merge blk_recount_segments into blk_recalc_rq_segments NeilBrown
2007-08-16 11:21 ` [PATCH 002 of 6] Introduce rq_for_each_segment replacing rq_for_each_bio NeilBrown
2007-08-17 7:13 ` Geert Uytterhoeven
2007-08-18 14:37 ` Satyam Sharma
2007-08-18 14:30 ` Jan Engelhardt
2007-08-18 14:48 ` Satyam Sharma
2007-08-20 11:21 ` Geert Uytterhoeven
2007-08-20 12:46 ` Jan Engelhardt
2007-08-21 1:38 ` Satyam Sharma
2007-08-21 7:09 ` Geert Uytterhoeven
2007-08-21 9:46 ` Satyam Sharma
2007-08-21 9:52 ` Geert Uytterhoeven
2007-08-21 10:41 ` [PATCH] PS3: Update MAINTAINERS Satyam Sharma
2007-08-21 19:01 ` Geoff Levand
2007-08-21 20:01 ` Joe Perches
2007-08-21 20:06 ` Rene Herman
2007-08-21 20:17 ` Geoff Levand
2007-08-21 20:33 ` Rene Herman
2007-08-21 20:48 ` Satyam Sharma
2007-08-21 20:41 ` Rene Herman
2007-08-21 20:47 ` Joe Perches
2007-08-21 21:58 ` Hugh Blemings
2007-08-23 18:14 ` Matt Mackall
2007-08-24 5:52 ` Hugh Blemings
2007-08-21 20:10 ` Geoff Levand
2007-08-24 6:25 ` [Cbe-oss-dev] " Hugh Blemings
2007-08-24 6:47 ` Satyam Sharma
2007-08-24 6:48 ` Hugh Blemings
2007-08-16 11:21 ` [PATCH 003 of 6] Fix various abuse of bio fields in umem.c NeilBrown
2007-08-16 11:21 ` [PATCH 004 of 6] New function blk_req_append_bio NeilBrown
2007-08-16 11:21 ` NeilBrown
2007-08-16 11:21 ` [PATCH 005 of 6] Stop exporting blk_rq_bio_prep NeilBrown
2007-08-16 11:21 ` NeilBrown
2007-08-16 11:21 ` NeilBrown [this message]
2007-08-16 11:36 ` [PATCH 000 of 6] A few block-layer tidy-up patches Jens Axboe
2007-08-17 0:40 ` Neil Brown
2007-08-17 6:17 ` Jens Axboe
2007-08-17 7:21 ` Neil Brown
2007-08-17 12:37 ` Jens Axboe
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=1070816112127.12245@suse.de \
--to=neilb@suse.de \
--cc=htejun@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@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.