Re: Patch??: linux-2.5.20/fs/bio.c - ll_rw_kio could generate bio's bigger than queue could handle

Thunder from the hill
2002-06-07T16:52:31Z

Hi,

On Fri, 7 Jun 2002, Adam J. Richter wrote:
> int max_phys = parent->childqueue[0].max_phys_segments;
> int max_hw = parent->childqueue[0].max_hw_segments;
> int max_sec = parent->childqueue[0].max_sectors;

> for (i = 1; i < parent->num_children; i++) {
> max_phys = min(max_phys, parent->childqueue[0].max_phys_segments);
> max_hw = min(max_hw, parent->childqueue[0].max_hw_segments);
> max_sec = min(max_sec, parent->childqueue[0].max_sectors);
> }

Just a question: Did you mean parent->childqueue[0] here, or rather
parent->childqueue[i]?

> blk_queue_max_phys_segments(&parent->queue, max_phys);
> blk_queue_max_hw_segments(&parent->queue, max_hw);
> blk_queue_max_sectors(&parent->queue, max_sec);

Regards,
Thunder
--
ship is leaving right on time | Thunder from the hill at ngforever
empty harbour, wave goodbye |
evacuation of the isle | free inhabitant not directly
caveman's paintings drowning | belonging anywhere