hi,all
It seems that block
device drivers use the readpage() method of the address_space to get a page data
from devices. And then the readpage() invorks the submit_bio() to execute a
IO request, which results in the make_request_fn() does the real IO
work.
for ide-disk, the
make_request_fn() is __make_request(), but for the ramdisk in rd.c, it is
rd_make_request().
What confuses me is
that, the readpage() in the the rd.c does not do anything like submit_bio(),
which does in ext2_readpage():
static int ramdisk_readpage(struct file *file,
struct page *page)
{
if (!PageUptodate(page))
make_page_uptodate(page);
unlock_page(page);
return 0;
}
{
if (!PageUptodate(page))
make_page_uptodate(page);
unlock_page(page);
return 0;
}
SO, when is the rd_make_request()(which is the
function does the real work) to be invoked?
any reply would be
appreciated.
R.wen
rwen2012
2007-06-06