mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fawad Lateef <fawadlateef@gmail.com>
To: Joshua Hudson <joshudson@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Block device API
Date: Wed, 25 Jan 2006 08:17:02 +0500	[thread overview]
Message-ID: <1e62d1370601241917l4c53cf3fud34835c4dc5c1526@mail.gmail.com> (raw)
In-Reply-To: <bda6d13a0601241858g260b915bs5370d34ac90321de@mail.gmail.com>

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
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.

I hope this helps !

--
Fawad Lateef

  reply	other threads:[~2006-01-25  3:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-25  2:58 Joshua Hudson
2006-01-25  3:17 ` Fawad Lateef [this message]
2006-01-25  8:37   ` Coywolf Qi Hunt
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=1e62d1370601241917l4c53cf3fud34835c4dc5c1526@mail.gmail.com \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®