Re: Block device API

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

 



On Wed, Jan 25, 2006 at 08:17:02AM +0500, Fawad Lateef wrote:
> On 1/25/06, Joshua Hudson <[email protected]> wrote:
> > I am working on a kernel filesystem driver. I have found plenty of
> > documentation on
> > how to communicate between the VFS and the filesystem driver, but nothing
> > on how to communicate between the block device and the filesystem driver.
> >
> 
> AFAIK there isn't any documentation/article for block and filesystem
> layer interaction (or till now me also not able to find any) :)
> 
> > I found sb_bread() but there is no corrisponding sb_bwrite().
> > I presume that if ((struct superblock *)s) -> bdev is the block
> > device handle, but I cannot find the read/write pair of functions.
> > -
> 
> sb_bread is the function used for reading a block (especially
> superblock) from the storage. For reading/writing do look at

Does __bread() contribute to page cache? I think not. And we don't
care the work done by __bread().

> generic_file_read/write functions found in mm/filemap.c and when going
> through the code you will see its ends up in calling
> mappings->a_ops->readpage(s)/writepage(s) of filesystem in which
> normal filesystems (like ext2) just call function
> mpage_readpages/writepages found in fs/mpage.c which performs actual
> read/write on the block device.
-- 
Coywolf Qi Hunt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux