aboutsummaryrefslogtreecommitdiff
path: root/block/partitions
diff options
context:
space:
mode:
authorLiu Bo2012-09-11 08:33:50 -0600
committerChris Mason2012-12-17 14:48:21 -0500
commit213490b301773ea9c6fb89a86424a6901fcdd069 (patch)
tree5f5d1df3c7de78ccb75d0d41a281103d177c72b8 /block/partitions
parent9c52057c698fb96f8f07e7a4bcf4801a092bda89 (diff)
Btrfs: fix a bug of per-file nocow
Users report a bug, the reproducer is: $ mkfs.btrfs /dev/loop0 $ mount /dev/loop0 /mnt/btrfs/ $ mkdir /mnt/btrfs/dir $ chattr +C /mnt/btrfs/dir/ $ dd if=/dev/zero of=/mnt/btrfs/dir/foo bs=4K count=10; $ lsattr /mnt/btrfs/dir/foo ---------------C- /mnt/btrfs/dir/foo $ filefrag /mnt/btrfs/dir/foo /mnt/btrfs/dir/foo: 1 extent found ---> an extent $ dd if=/dev/zero of=/mnt/btrfs/dir/foo bs=4K count=1 seek=5 conv=notrunc,nocreat; sync $ filefrag /mnt/btrfs/dir/foo /mnt/btrfs/dir/foo: 3 extents found ---> with nocow, btrfs breaks the extent into three parts The new created file should not only inherit the NODATACOW flag, but also honor NODATASUM flag, because we must do COW on a file extent with checksum. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'block/partitions')
0 files changed, 0 insertions, 0 deletions