• Ryusuke Konishi's avatar
    nilfs2: always lookup disk block address before reading metadata block · 14351104
    Ryusuke Konishi authored
    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: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
mdt.c 13.8 KB