]> git.baikalelectronics.ru Git - kernel.git/commit
nilfs2: always lookup disk block address before reading metadata block
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sun, 6 Sep 2009 08:49:49 +0000 (17:49 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 14 Sep 2009 09:27:13 +0000 (18:27 +0900)
commit4f592575edc66bdec64ff3caedcd4587ef656647
treebd9b8570880cfda44a9fad7a2567b977ab53f631
parent22f1ea73c63c8f5c5dfc1e5d112d31e2964a6540
nilfs2: always lookup disk block address before reading metadata block

The current metadata file code skips disk address lookup for its data
block if the buffer has a mapped flag.

This has a potential risk to cause read request to be performed
against the stale block address that GC moved, and it may lead to meta
data corruption.  The mapped flag is safe if the buffer has an
uptodate flag, otherwise it may prevent necessary update of disk
address in the next read.

This will avoid the potential problem by ensuring disk address lookup
before reading metadata block even for buffers with the mapped flag.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/mdt.c