lkml.org 
[lkml]   [2007]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 012 of 35] Share code between init_request_from_bio and blk_rq_bio_prep

    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 | 11 ++---------
    1 file changed, 2 insertions(+), 9 deletions(-)

    diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
    --- .prev/block/ll_rw_blk.c 2007-07-31 11:20:56.000000000 +1000
    +++ ./block/ll_rw_blk.c 2007-07-31 11:20:57.000000000 +1000
    @@ -2905,17 +2905,10 @@ 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->bio = req->biotail = bio;
    - req->first_offset = 0;
    - req->current_nr_sectors = req->hard_cur_sectors =
    - blk_rq_cur_sectors(req);
    - req->nr_phys_segments = bio_phys_segments(req->q, bio);
    - req->nr_hw_segments = bio_hw_segments(req->q, bio);
    - req->buffer = blk_rq_data(req); /* see ->buffer comment above */
    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)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-07-31 04:25    [W:4.154 / U:0.456 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site