From: Joel Fernandes <agnel.joel@gmail.com>
To: linux-fsdevel@vger.kernel.org
Subject: bread problem
Date: Thu, 13 Aug 2009 22:04:56 -0700 [thread overview]
Message-ID: <9ff7a3bc0908132204h53ec122bo5afd9f5f7da26d58@mail.gmail.com> (raw)
In-Reply-To: <9ff7a3bc0908132152g694a2009r9007aed59428f892@mail.gmail.com>
Hi,
I'm trying to read a block from disk by block_nr using __bread before
the block has even been written to disk.
The problem in doing this is the block is cached (junk data) and
future sb_bread's return the buffer head from this cache, and not one
that represent the actual data after this data has been written to
disk.
1. block contains junk
2. bread -> cached junk
3. actual data written to disk through the address space object hosted
by some other inode
4. bread -> still returns bh with junk
Is there any way to force a read from disk while doing the second
bread, or to instruct the kernel that the block that's in the cache
has to be re-read?
Thanks,
Joel
parent reply other threads:[~2009-08-14 5:11 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <9ff7a3bc0908132152g694a2009r9007aed59428f892@mail.gmail.com>]
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=9ff7a3bc0908132204h53ec122bo5afd9f5f7da26d58@mail.gmail.com \
--to=agnel.joel@gmail.com \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).