Skip to contentSkip to conversation

bio_chain: proposed solution for bio_alloc failure and large IO simplification

DISCUSSION Adam J. Richter 2 participants 2 messages Jun 15, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

- It's tricky to determine how many bvecs are available in a bio. There is no straightforward "how big is it" field in struct bio.

	Can't I make a macro to do a table lookup from bio->bi_max?
Adam J. Richter     __     ______________   575 Oroville Road
[email protected]     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

"Free Software For The Rest Of Us."

#1 lore raw
Quoted 6 lines · Adam J. Richter
Quoted 4 lines

- It's tricky to determine how many bvecs are available in a bio. There is no straightforward "how big is it" field in struct bio.

        Can't I make a macro to do a table lookup from bio->bi_max?

Not really. If I do

	bio_alloc(GFP_KERNEL, 27);

then I'll get a 32-slot bvec. But presumably, I don't want to put more than 27 pages into it.

-