generic: check fiemap SHARED flag on sync
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 16 May 2016 01:14:15 +0000 (09:14 +0800)
committerEryu Guan <eguan@redhat.com>
Wed, 15 Jun 2016 07:14:35 +0000 (15:14 +0800)
commit5c2fbcc69e3cef06852d32050882d8a2267b95c4
treee357b07ff0a2053d7dd799dac21a817331c96460
parent6df776bae86fb2dcb11bf2db770f1623002501e6
generic: check fiemap SHARED flag on sync

The test case will check SHARED flag returned by fiemap ioctl on
reflinked files before and after sync.

Normally SHARED flag won't change just due to a normal sync
operation.

But btrfs doesn't handle SHARED flag well, and this time it won't
check any delayed extent tree(reverse extent searching tree)
modification, but only metadata already committed to disk.

So btrfs will not return correct SHARED flag on reflinked files if
there is no sync to commit all metadata.

This testcase will just check it.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/353 [new file with mode: 0755]
tests/generic/353.out [new file with mode: 0644]
tests/generic/group