Re: struct page question

Jens Axboe (axboe@suse.de)
Wed, 25 Sep 2002 09:34:30 +0200


On Tue, Sep 24 2002, Luben Tuikov wrote:
> Is it possible to build a struct page *page, where
> page_address(page) == some virtual address (not high mem of course)?
>
> The reason I want to do this is so that I can pass it to
> generic_make_request(), having only a pointer to a buffer
> and size to a buffer, and the fact that not all devices
> have request_fn() exposed (e.g. md).
>
> 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;

-- 
Jens Axboe

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