]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: directly compare refcount records
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 20 Nov 2020 22:03:29 +0000 (17:03 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 20 Nov 2020 22:03:29 +0000 (17:03 -0500)
Check that our observed refcount records have exact matches for what's
in the ondisk refcount btree, since they're supposed to match exactly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/rmap.c

index a4cc6a4937c926b208fe894709555fab3aadab14..54451a7e262d08bc5bbf08b543568b2d0292f1f7 100644 (file)
@@ -1402,8 +1402,8 @@ _("Missing reference count record for (%u/%u) len %u count %u\n"),
 
                /* Compare each refcount observation against the btree's */
                if (tmp.rc_startblock != rl_rec->rc_startblock ||
-                   tmp.rc_blockcount < rl_rec->rc_blockcount ||
-                   tmp.rc_refcount < rl_rec->rc_refcount)
+                   tmp.rc_blockcount != rl_rec->rc_blockcount ||
+                   tmp.rc_refcount != rl_rec->rc_refcount)
                        do_warn(
 _("Incorrect reference count: saw (%u/%u) len %u nlinks %u; should be (%u/%u) len %u nlinks %u\n"),
                                agno, tmp.rc_startblock, tmp.rc_blockcount,