On Thu, 2011-01-20 at 12:07 +0200, Or Gerlitz wrote:
> David Dillow wrote:
> > Fix direct IO when doing more than 1 MB IOs -- proper patch to fix is
> > floating in the ether as well, now landed in Andrew Morton's tree.
> 
> So what was the behavior without this patch?

It would oops in dio_bio_alloc() because we tried to allocate too many
entries in the bio -- bio_alloc() returned NULL and it was not checked.

> also can you send pointer to that tree and mailing list this patch was
> submitted, I'd like to follow on the discussion there, thanks,

http://article.gmane.org/gmane.linux.file-systems/50288


> > --- a/fs/direct-io.c
> > +++ b/fs/direct-io.c
> > @@ -583,6 +583,7 @@ static int dio_new_bio(struct dio *dio, sector_t 
> > start_sector)
> >             goto out;
> >     sector = start_sector << (dio->blkbits - 9);
> >     nr_pages = min(dio->pages_in_io, bio_get_nr_vecs(dio->map_bh.b_bdev));
> > +   nr_pages = min(nr_pages, BIO_MAX_PAGES);
> >     BUG_ON(nr_pages <= 0);
> >     ret = dio_bio_alloc(dio, dio->map_bh.b_bdev, sector, nr_pages);
> >     dio->boundary = 0;

-- 
Dave Dillow
National Center for Computational Science
Oak Ridge National Laboratory
(865) 241-6602 office

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to