Shouldn't unmap_underlying_metadata() mark buffers not uptodate?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux