Skip to content

Commit

Permalink
block: Rename bio_split() -> bio_pair_split()
Browse files Browse the repository at this point in the history
This is prep work for introducing a more general bio_split().

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: NeilBrown <neilb@suse.de>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Sage Weil <sage@inktank.com>
  • Loading branch information
Kent Overstreet committed Nov 24, 2013
1 parent 196d38b commit ee67891
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2399,7 +2399,7 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
if (last_zone != zone) {
BUG_ON(last_zone != zone + pd->settings.size);
first_sectors = last_zone - bio->bi_iter.bi_sector;
bp = bio_split(bio, first_sectors);
bp = bio_pair_split(bio, first_sectors);
BUG_ON(!bp);
pkt_make_request(q, &bp->bio1);
pkt_make_request(q, &bp->bio2);
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static void linear_make_request(struct mddev *mddev, struct bio *bio)

rcu_read_unlock();

bp = bio_split(bio, end_sector - bio->bi_iter.bi_sector);
bp = bio_pair_split(bio, end_sector - bio->bi_iter.bi_sector);

linear_make_request(mddev, &bp->bio1);
linear_make_request(mddev, &bp->bio2);
Expand Down
6 changes: 3 additions & 3 deletions drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,11 @@ static void raid0_make_request(struct mddev *mddev, struct bio *bio)
* refuse to split for us, so we need to split it.
*/
if (likely(is_power_of_2(chunk_sects)))
bp = bio_split(bio, chunk_sects - (sector &
bp = bio_pair_split(bio, chunk_sects - (sector &
(chunk_sects-1)));
else
bp = bio_split(bio, chunk_sects -
sector_div(sector, chunk_sects));
bp = bio_pair_split(bio, chunk_sects -
sector_div(sector, chunk_sects));
raid0_make_request(mddev, &bp->bio1);
raid0_make_request(mddev, &bp->bio2);
bio_pair_release(bp);
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ static void make_request(struct mddev *mddev, struct bio * bio)
/* This is a one page bio that upper layers
* refuse to split for us, so we need to split it.
*/
bp = bio_split(bio, chunk_sects -
bp = bio_pair_split(bio, chunk_sects -
(bio->bi_iter.bi_sector & (chunk_sects - 1)));

/* Each of these 'make_request' calls will call 'wait_barrier'.
Expand Down
4 changes: 2 additions & 2 deletions fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@ static void bio_pair_end_2(struct bio *bi, int err)
/*
* split a bio - only worry about a bio with a single page in its iovec
*/
struct bio_pair *bio_split(struct bio *bi, int first_sectors)
struct bio_pair *bio_pair_split(struct bio *bi, int first_sectors)
{
struct bio_pair *bp = mempool_alloc(bio_split_pool, GFP_NOIO);

Expand Down Expand Up @@ -1874,7 +1874,7 @@ struct bio_pair *bio_split(struct bio *bi, int first_sectors)

return bp;
}
EXPORT_SYMBOL(bio_split);
EXPORT_SYMBOL(bio_pair_split);

/**
* bio_trim - trim a bio
Expand Down
2 changes: 1 addition & 1 deletion include/linux/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ struct bio_pair {
atomic_t cnt;
int error;
};
extern struct bio_pair *bio_split(struct bio *bi, int first_sectors);
extern struct bio_pair *bio_pair_split(struct bio *bi, int first_sectors);
extern void bio_pair_release(struct bio_pair *dbio);
extern void bio_trim(struct bio *bio, int offset, int size);

Expand Down

0 comments on commit ee67891

Please sign in to comment.