On 2/6/20 8:59 PM, Qu Wenruo wrote:
[BUG] Btrfs/022 sometimes fails with snapshot's reference mismatch with its source. [CAUSE] Since commit fd0830929573 ("fsstress: add the ability to create snapshots") adds the ability for fsstress to create/delete snapshot and subvolumes, fsstress will create new subvolumes under test dir. For example, we could have the following subvolumes created by fsstress: subvol a id=256 subvol b id=306 qgroupid rfer excl -------- ---- ---- 0/5 16384 16384 0/256 13914112 16384 ... 0/263 3080192 2306048 << 2 *306* 048 ... 0/306 13914112 16384 << 0/ *306 So when we're greping for subvolid 306, it matches qgroup 0/263 first, which has difference size, and caused false alert. [FIX] Instead of greping "$subvolid" blindly, now grep "0/$subvolid" to catch qgroupid correctly, without hitting rfer/excl values. Suggested-by: Josef Bacik <josef@xxxxxxxxxxxxxx> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx> Thanks, Josef