On Tue, Sep 11, 2012 at 10:33:50PM +0800, Liu Bo wrote:
> 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....@oracle.com>

Reviewed-by: David Sterba <dste...@suse.cz>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to