it happens like that
read--> sys_read--->vfs_read-->ext2_read--->readpage func of address space ---> mpage_readpage --->
then page is converted to single or multiple bios (depending upon whether buffers
contained in page are physically contiguous or not )
---> for each buffer in page a bio is initialized ---> then submit_bio --->
Now
the portion highlighted is one
where page cache is consulted ---> if page is available in page cache and uptodate too --- then no need to read from disk
otherwise ---- > process continues till submit_bio
now
you need to know now
how Buffer in a page is mapped to a bio ----> there is one to one fields are mapped .......thats given beautifully in UTLK.
hope it clears ur doubts
Nidhi
On Wed, Jun 2, 2010 at 9:32 AM, Da Zheng <zhengda1936@xxxxxxxxx> wrote:
On 10-6-1 上午11:23, Joel Fernandes wrote:Thanks. So the disk cache actually works beneath the file system instead of on
>> I'm learning block devices in Linux. It seems submit_bio can be used by file
>> systems to submit block IO requests. But after I search for it in the linux
>> kernel, I didn't see file systems like ext2 and ext3 use it. So how does a file
>> system usually submit a request? I didn't find a wrapper of submit_bio or
>> generic_make_request can be used either.
>
> Usually one of the functions defined in buffer_head.h like sb_bread or sb_getblk
> is used. The bio structure and its attributes have to be initialized properly and
> you usually don't need to do this on your own.
the top of it as described in Understanding the Linux Kernel.
Zheng Da
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ
--
Thanks & Regards
Nidhi Mittal Hada
Scientific officer D
Computer Division
Bhabha Atomic Research Center
Mumbai