]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix clone to deal with holes when NO_HOLES feature is enabled
authorFilipe Manana <fdmanana@gmail.com>
Sun, 1 Jun 2014 00:50:28 +0000 (01:50 +0100)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:21:09 +0000 (17:21 -0700)
commit789e0bbae4c5c0dc6dc7a260b0ee717603912635
tree1220f3891d76ecd4effad62c261f2fa41a585d5c
parent5cd4a2e6fe8920a6fee119623a9a14bb857b1c73
Btrfs: fix clone to deal with holes when NO_HOLES feature is enabled

If the NO_HOLES feature is enabled holes don't have file extent items in
the btree that represent them anymore. This made the clone operation
ignore the gaps that exist between consecutive file extent items and
therefore not create the holes at the destination. When not using the
NO_HOLES feature, the holes were created at the destination.

A test case for xfstests follows.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ioctl.c