generic: test cloning large exents to a file with many small extents
authorFilipe Manana <fdmanana@suse.com>
Fri, 28 Jun 2019 22:08:36 +0000 (23:08 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 7 Jul 2019 12:55:39 +0000 (20:55 +0800)
commit7d059370d24a606227a6f1e96f30f2f334e0dcc5
tree77693c3d6c1197e33d5b104348f644cf9beea7bc
parentc3cb6fbde71309728350714ec3eceae745d7b5ba
generic: test cloning large exents to a file with many small extents

Test that if we clone a file with some large extents into a file
that has many small extents, when the fs is nearly full, the clone
operation does not fail and produces the correct result.

This is motivated by a bug found in btrfs wich is fixed by the
following patches for the linux kernel:

 [PATCH 1/2] Btrfs: factor out extent dropping code from hole punch handler
 [PATCH 2/2] Btrfs: fix ENOSPC errors, leading to transaction aborts, when
             cloning extents

The test currently passes on xfs.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/562 [new file with mode: 0755]
tests/generic/562.out [new file with mode: 0644]
tests/generic/group