Re: struct page question

Jens Axboe
2002-09-26T05:28:10Z

On Wed, Sep 25 2002, Luben Tuikov wrote:
> Jens Axboe wrote:
> >
> > > Apparently I cannot just set b_data and b_size, b_page
> > > also has to be set and it also seems that it will
> > > not work if page_address(b_page) != b_data...
> >
> > bh->b_page = virt_to_page(va);
> > bh->b_data = va;
>
> Thanks Jens again.
>
> My doubts are that va might not point to page->virtual,
> but may point ``in the middle'' of the page, in which case
> md will cough up since it does the page_address(b_page) != b_data
> then BUG()...

It's quite legal for b_data to point to somewhere in the middle of the
page. See usage of bh_offset(). What coughs up and where?

--
Jens Axboe