Skip to contentSkip to conversation

xfs: validate rc_domain in xchk_rtrefcount_mergeable

PATCH Applied Eric Sandeen 3 participants 3 messages Sep 29 – Oct 8

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: validate rc_domain in xchk_rtrefcount_mergeable

xchk_refcount_mergeable validates that the domains match, but this was omitted from the realtime version of the check; fix it.

Fixes c27929670de144 ("xfs: scrub the realtime refcount btree")
---
 fs/xfs/scrub/rtrefcount.c | 2 ++
 1 file changed, 2 insertions(+)
fs/xfs/scrub/rtrefcount.c +2 -0
index 3d916d71a135..460e3f094adf 100644
@@ -379,6 +379,8 @@ xchk_rtrefcount_mergeable(
 	if (r1->rc_blockcount == 0)
 		return false;
 
+	if (r1->rc_domain != r2->rc_domain)
+		return false;
 	if (r1->rc_startblock + r1->rc_blockcount != r2->rc_startblock)
 		return false;
 	if (r1->rc_refcount != r2->rc_refcount)
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Eric Sandeen

xchk_refcount_mergeable validates that the domains match, but this was omitted from the realtime version of the check; fix it.

Fixes c27929670de144 ("xfs: scrub the realtime refcount btree")

Nice catch!

--D

Quoted 21 lines
---
 fs/xfs/scrub/rtrefcount.c | 2 ++
 1 file changed, 2 insertions(+)
fs/xfs/scrub/rtrefcount.c +2 -0
index 3d916d71a135..460e3f094adf 100644
@@ -379,6 +379,8 @@ xchk_rtrefcount_mergeable(
 	if (r1->rc_blockcount == 0)
 		return false;
 
+	if (r1->rc_domain != r2->rc_domain)
+		return false;
 	if (r1->rc_startblock + r1->rc_blockcount != r2->rc_startblock)
 		return false;
 	if (r1->rc_refcount != r2->rc_refcount)
Signature · 1 line
2.55.0
maintainer Applied
#2 lore raw
In reply to Eric Sandeen
Quoted 4 lines · Eric Sandeen

xchk_refcount_mergeable validates that the domains match, but this was omitted from the realtime version of the check; fix it.

Applied to for-next, thanks!

[1/1] xfs: validate rc_domain in xchk_rtrefcount_mergeable

      commit: f04361fb8694bff98ec61e2e2030a1993426fdca

Best regards,

Signature · 1 line
Carlos Maiolino <[email protected]>