Re: [PATCH 4/5] xfs_metadump: Zap unused space in inode btrees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 26, 2018 at 10:20 PM Stefan Ring <stefanrin@xxxxxxxxx> wrote:
>
> ---
>  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);

Oh well. This should be 0 instead of 'a' and 'b'.

> +
> +               /* 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
>



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux