• Yan Zheng's avatar
    Btrfs: Update and fix mount -o nodatacow · f321e491
    Yan Zheng authored
    To check whether a given file extent is referenced by multiple snapshots, the
    checker walks down the fs tree through dead root and checks all tree blocks in
    the path.
    
    We can easily detect whether a given tree block is directly referenced by other
    snapshot. We can also detect any indirect reference from other snapshot by
    checking reference's generation. The checker can always detect multiple
    references, but can't reliably detect cases of single reference. So btrfs may
    do file data cow even there is only one reference.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    f321e491
inode.c 95 KB