All of lore.kernel.org
 help / color / mirror / Atom feed
From: Coywolf Qi Hunt <qiyong@fc-cn.com>
To: Fawad Lateef <fawadlateef@gmail.com>
Cc: Joshua Hudson <joshudson@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Block device API
Date: Wed, 25 Jan 2006 16:37:28 +0800	[thread overview]
Message-ID: <20060125083728.GA16593@localhost.localdomain> (raw)
In-Reply-To: <1e62d1370601241917l4c53cf3fud34835c4dc5c1526@mail.gmail.com>

On Wed, Jan 25, 2006 at 08:17:02AM +0500, Fawad Lateef wrote:
> On 1/25/06, Joshua Hudson <joshudson@gmail.com> 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

  reply	other threads:[~2006-01-25  8:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-25  2:58 Block device API Joshua Hudson
2006-01-25  3:17 ` Fawad Lateef
2006-01-25  8:37   ` Coywolf Qi Hunt [this message]
2006-01-25  9:27     ` Fawad Lateef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060125083728.GA16593@localhost.localdomain \
    --to=qiyong@fc-cn.com \
    --cc=fawadlateef@gmail.com \
    --cc=joshudson@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.