src/fssum: skip subvolumes when building a sum
authorJosef Bacik <josef@toxicpanda.com>
Tue, 17 Dec 2019 15:25:05 +0000 (10:25 -0500)
committerEryu Guan <guaneryu@gmail.com>
Sun, 29 Dec 2019 17:53:56 +0000 (01:53 +0800)
commit805c6262d5f7892996c5c5bf4a051eb31260a4b5
tree39830c8fe712fa6e963db21e963f1147124f4ac3
parentf2e567ab172c874c4c6c4f09838b9122b84aa9a4
src/fssum: skip subvolumes when building a sum

With the snapshot/subvolume support added to fsstress I've been seeing
random failures with our send/receive related tests.  This is because
fssum is summing the path with the subvolumes for our test fs'es that
are generated by fsstress.  But with send/receive it skips subvolumes,
which makes the sums mismatch.  Fix this by skipping directories that do
not match our st_dev, which is how we differentiate subvolumes in btrfs.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/fssum.c