Re: how does a filesystem submit a block IO request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the reply. Just one more question: what is ext2_read? I don't find a
definition of ext2_read in Linux v2.6.29. The only thing I found is
ext2_readpage, but apparently, it's not what you meant.

Best regards,
Zheng Da

On 10-6-3 下午2:45, nidhi mittal hada wrote:
> see as
> 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
> <mailto:zhengda1936@xxxxxxxxx>> wrote:
> 
>     On 10-6-1 上午11:23, Joel Fernandes wrote:
>     >> 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.
>     Thanks. So the disk cache actually works beneath the file system
>     instead of on
>     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
>     <mailto: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
> 
> 


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux