generic: test number of blocks used by a file after mwrite into a hole
authorFilipe Manana <fdmanana@suse.com>
Wed, 4 Nov 2020 11:13:37 +0000 (11:13 +0000)
committerEryu Guan <guaneryu@gmail.com>
Sun, 8 Nov 2020 07:07:09 +0000 (15:07 +0800)
commit043e5bb164a64fcaaa316bcbdcd9ee1df6967088
treeca93b6b8efd613c7078f83107706e256cb7e6247
parente71ecb8f1c1e10803ee07499455a7ed06b396440
generic: test number of blocks used by a file after mwrite into a hole

Test that after doing a memory mapped write to an empty file, a call to
stat(2) reports a non-zero number of used blocks.

This is motivated by a bug in btrfs where the number of blocks used does
not change. It currenly fails on btrfs and it is fixed by a patch that
has the following subject:

  "btrfs: fix missing delalloc new bit for new delalloc ranges"

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