linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Shouldn't unmap_underlying_metadata() mark buffers not uptodate?
@ 2006-05-07 15:13 Martin Jambor
  0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2006-05-07 15:13 UTC (permalink / raw)
  To: Linux FS Development List

Hi,

we are developing a filesystem that writes data to disk in a manner
similar to mpage_writepages(). At the same time, the data can be read
back using bread(). Today we have encountered a situation where we
were reading old data. When we had a look at the disk with hexedit we
also saw old data and only after a reboot we saw the last stuff that
was written to the blocks in question.

Apparently, the reads were fulfilled with cached data in bdev mapping
that were no longer actually up to date.

We have managed to get rid of the problem when we implemented our own
version of unmap_underlying_metadata that also marked the buffer and
page in question as not up to date.

So our questions are:

a) is this likely to happen in other filesystems using
mpage_writepages()? If not, why?

For example, when you read a block directly from the block device,
then filesystem's mpage_writepages() overwrites it and finally you
read that same block from the device again, is it possible that you
read the old data again?

b) shouldn't unmap_underlying_metadata() therefore clear the buffers
uptodate flag?

c) or is there some other kernel (preferably exported :-) function
that we should use?

TIA

Martin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-07 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-07 15:13 Shouldn't unmap_underlying_metadata() mark buffers not uptodate? Martin Jambor

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