Re: [PATCH] Re: Bio device too big | kernel BUG at mm/filemap.c:537!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Feb 2007 12:30:39 +1100
Neil Brown <[email protected]> wrote:

> On Tuesday February 6, [email protected] wrote:
> > On Wed, 7 Feb 2007 10:26:56 +1100
> > Neil Brown <[email protected]> wrote:
> > 
> > > +static int bio_fits_rdev(struct bio *bi)
> > > +{
> > > +	request_queue_t *q = bdev_get_queue(bi->bi_bdev);
> > > +
> > > +	if ((bi->bi_size>>9) > q->max_sectors)
> > > +		return 0;
> > > +	blk_recount_segments(q, bi);
> > > +	if (bi->bi_phys_segments > q->max_phys_segments ||
> > > +	    bi->bi_hw_segments > q->max_hw_segments)
> > > +		return 0;
> > > +
> > > +	if (q->merge_bvec_fn)
> > > +		/* it's too hard to apply the merge_bvec_fn at this stage,
> > > +		 * just just give up
> > > +		 */
> > > +		return 0;
> > > +
> > > +	return 1;
> > > +}
> > 
> > Isn't think going to return 0 rather a lot of the time?
> 
> Why do you say that?

Because I was too lazy to go off and work out who's setting merge_bvec_fn.

> merge_bvec_fn is only set for dm, md, pktcdvd.c so what won't cause a
> zero in real-world cases (it rarely makes sense to put a raid5 on top
> of those things).

OK.   Hopefully it'll stay that way...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux