mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Block Device <blockdevice@gmail.com>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: Linux Kernel Mailing List <Linux-Kernel@vger.kernel.org>
Subject: Re: Block I/O Mystery
Date: Fri, 7 Oct 2005 17:06:37 +0530	[thread overview]
Message-ID: <64c763540510070436s681a3e00q511fb68c1c876aa9@mail.gmail.com> (raw)
In-Reply-To: <17222.18470.744354.727641@gargle.gargle.HOWL>

Hi,

   After some more toying around, I have seen that it works correctly
on ext2 fs but not
on etx3. :) ...

  My questions inline ..

On 10/7/05, Nikita Danilov <nikita@clusterfs.com> wrote:

> Blocks read by bread() and friends are cached in block device (not you
> :-) struct address_space. File data are cached in the per-inode struct
> address_space.

But even if I'm reading blocks from a device directly, they are
finally blocks from  the same inode. Why then are they stored
separately ?

> You are bypassing normal file sysetm caching and results can be
> unpredictable.

Is there then a safe way to do it w/o going through the filesystem caching ?

If not, I guess the following steps will be required :
a) Find out the page in the mapping corresponding to the blocks I need
to write.
b) Lock the page. Make changes. Mark it dirty and sync write it ?

Is there something in the kernel which does this already ?

Thanks for the help :) !

-Regards
 BD

  reply	other threads:[~2005-10-07 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07  6:01 Block Device
2005-10-07 10:04 ` Nikita Danilov
2005-10-07 11:36   ` Block Device [this message]
2005-10-07 11:56     ` Nikita Danilov

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=64c763540510070436s681a3e00q511fb68c1c876aa9@mail.gmail.com \
    --to=blockdevice@gmail.com \
    --cc=Linux-Kernel@vger.kernel.org \
    --cc=nikita@clusterfs.com \
    /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®