* [Drbd-dev] bio_split()...
@ 2005-03-15 20:15 Philipp Reisner
2005-03-15 20:24 ` [Drbd-dev] bio_split() Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Reisner @ 2005-03-15 20:15 UTC (permalink / raw)
To: Jens Axboe; +Cc: drbd-dev
Hi Jens,
bio_split only works for bios with a single page...
[ from bio.c: ]
/*
* split a bio - only worry about a bio with a single page
* in it's iovec
*/
struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors)
{
struct bio_pair *bp = mempool_alloc(pool, GFP_NOIO);
if (!bp)
return bp;
BUG_ON(bi->bi_vcnt != 1);
[...]
In DRBD-0.8 I want to split BIO's that cross a 16 MB boundary.
In DRBD-0.8 I accept BIOs with more than one page (currently up to
32 kB in a single BIO), I thought that bio_split is here
to handle such situations....
Is there an other way to go ?
Would you accept a patch that would make bio_split to work with bigger
BIOs ?
Currently my code hits that BUG_ON statement....
-Philipp
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Drbd-dev] Re: bio_split()...
2005-03-15 20:15 [Drbd-dev] bio_split() Philipp Reisner
@ 2005-03-15 20:24 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2005-03-15 20:24 UTC (permalink / raw)
To: Philipp Reisner; +Cc: drbd-dev
On Tue, Mar 15 2005, Philipp Reisner wrote:
> Hi Jens,
>
> bio_split only works for bios with a single page...
>
> [ from bio.c: ]
> /*
> * split a bio - only worry about a bio with a single page
> * in it's iovec
> */
> struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors)
> {
> struct bio_pair *bp = mempool_alloc(pool, GFP_NOIO);
>
> if (!bp)
> return bp;
>
> BUG_ON(bi->bi_vcnt != 1);
> [...]
>
> In DRBD-0.8 I want to split BIO's that cross a 16 MB boundary.
> In DRBD-0.8 I accept BIOs with more than one page (currently up to
> 32 kB in a single BIO), I thought that bio_split is here
> to handle such situations....
>
> Is there an other way to go ?
> Would you accept a patch that would make bio_split to work with bigger
> BIOs ?
The trick is usually to avoid such build-up in the first place - does
the merge_bvec_fn() not work for you there? bio_split() is just there to
cater to cases of a single page nature, because you cannot refuse to add
a single page.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-15 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15 20:15 [Drbd-dev] bio_split() Philipp Reisner
2005-03-15 20:24 ` [Drbd-dev] bio_split() Jens Axboe
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.