Commit 20d7bfad2d ("reflink: add test support routines to a separate
file") moved the function _require_cp_reflink to the new file
common/reflink but forgot to make btrfs/091 source that file, leading
to the following failure:
$ ./check btrfs/091
FSTYP -- btrfs
PLATFORM -- Linux/x86_64 debian3 4.3.0-rc5-btrfs-next-17+
MKFS_OPTIONS -- /dev/sdc
MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1
btrfs/091 1s ... - output mismatch (see .../results//btrfs/091.out.bad)
--- tests/btrfs/091.out 2015-05-03 01:19:42.128976975 +0100
+++ .../results/btrfs/091.out.bad 2015-11-18 15:56:35.332745132 +0000
@@ -1,4 +1,5 @@
QA output created by 091
+./tests/btrfs/091: line 49: _require_cp_reflink: command not found
wrote 262144/262144 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
65536 65536
...
(Run 'diff -u tests/btrfs/091.out .../results/btrfs/091.out.bad' \
to see the entire diff)
So just make btrfs/091 source common/reflink in order to know the
definition of _require_cp_reflink.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
[Problem]
Since commit fcebe4562dec83b3f8d308 ("Btrfs: rework qgroup accounting"),
quota data update is delayed after delayed_ref calculation, and lacks
correct protection to detect root reference which shouldn't be counted
in current sequence number but already written into extent backref.
This makes exclusive reference not decreased correctly and give incorrect
result.
[Test procedure]
1. Create a btrfs with 3 subvolumes, quota enabled and rescanned.
2. Create a file in 1st subvolume
3. Clone the file to 2nd and 3rd subvolume
4. Sync the fs to reflect the changes in qgroup.
5. Check the qgroup data
[Expected result]
None of the subvolume has exclusive reference to the file.
[Actual result]
The first subvolume still have exclusive reference to the file.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>