--- db/metadump.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/db/metadump.c b/db/metadump.c index a4867783..39183fb7 100644 --- a/db/metadump.c +++ b/db/metadump.c @@ -2173,6 +2173,19 @@ process_btinode( } pp = XFS_BMDR_PTR_ADDR(dib, 1, maxrecs); + + if (zero_stale_data) { + char *top; + + /* Unused btree key space */ + top = (char*)XFS_BMDR_KEY_ADDR(dib, nrecs + 1); + memset(top, 'a', (char*)pp - top); + + /* Unused btree ptr space */ + top = (char*)&pp[nrecs]; + memset(top, 'b', (char*)dib + XFS_DFORK_SIZE(dip, mp, whichfork) - top); + } + for (i = 0; i < nrecs; i++) { xfs_agnumber_t ag; xfs_agblock_t bno; -- 2.14.5