From 909daa84a868e6348e5688c72b5a703840f0438e Mon Sep 17 00:00:00 2001 From: Barry Naujok Date: Mon, 21 Jan 2008 15:10:06 +0000 Subject: [PATCH] Verify end of freespace btree extent is valid Merge of master-melb:xfs-cmds:30388a by kenmcd. Verify end of freespace btree extent is valid --- repair/scan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repair/scan.c b/repair/scan.c index a137cc83d..b9f7bc9d3 100644 --- a/repair/scan.c +++ b/repair/scan.c @@ -541,6 +541,8 @@ _("bno freespace btree block claimed (state %d), agno %d, bno %d, suspect %d\n") e = INT_GET(rp[i].ar_startblock, ARCH_CONVERT) + INT_GET(rp[i].ar_blockcount, ARCH_CONVERT); + if (!verify_agbno(mp, agno, e - 1)) + continue; for (b = INT_GET(rp[i].ar_startblock, ARCH_CONVERT); b < e; b++) { if (get_agbno_state(mp, agno, b) @@ -691,6 +693,8 @@ _("bcnt freespace btree block claimed (state %d), agno %d, bno %d, suspect %d\n" e = INT_GET(rp[i].ar_startblock, ARCH_CONVERT) + INT_GET(rp[i].ar_blockcount, ARCH_CONVERT); + if (!verify_agbno(mp, agno, e - 1)) + continue; for (b = INT_GET(rp[i].ar_startblock, ARCH_CONVERT); b < e; b++) { state = get_agbno_state(mp, agno, b); -- 2.47.2