linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Stefan Ring <stefanrin@gmail.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/5] xfs_metadump: Zap multi fsb blocks
Date: Fri, 11 Jan 2019 11:31:03 -0600	[thread overview]
Message-ID: <2b4718eb-bf55-600e-2a42-1b3128bf21bf@sandeen.net> (raw)
In-Reply-To: <20190107201355.18996-3-stefanrin@gmail.com>

On 1/7/19 2:13 PM, Stefan Ring wrote:
> Using basically the same code as in process_single_fsb_objects.
> 
> Signed-off-by: Stefan Ring <stefanrin@gmail.com>

thanks, the change here to goto write: looks good to me.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  db/metadump.c | 21 ++++++++++++++-------
>  1 file changed, 14 insertions(+), 7 deletions(-)
> 
> diff --git a/db/metadump.c b/db/metadump.c
> index 97d2a490..45705685 100644
> --- a/db/metadump.c
> +++ b/db/metadump.c
> @@ -1881,6 +1881,7 @@ process_multi_fsb_objects(
>  	typnm_t		btype,
>  	xfs_fileoff_t	last)
>  {
> +	char		*dp;
>  	int		ret = 0;
>  
>  	switch (btype) {
> @@ -1921,15 +1922,21 @@ process_multi_fsb_objects(
>  
>  			}
>  
> -			if ((!obfuscate && !zero_stale_data) ||
> -			     o >= mp->m_dir_geo->leafblk) {
> -				ret = write_buf(iocur_top);
> -				goto out_pop;
> -			}
> +			if (!obfuscate && !zero_stale_data)
> +				goto write;
>  
> -			process_dir_data_block(iocur_top->data, o,
> -					       last == mp->m_dir_geo->fsbcount);
> +			dp = iocur_top->data;
> +			if (o >= mp->m_dir_geo->freeblk) {
> +				/* TODO, zap any stale data */
> +				goto write;
> +			} else if (o >= mp->m_dir_geo->leafblk) {
> +				process_dir_leaf_block(dp);
> +			} else {
> +				process_dir_data_block(dp, o,
> +					 last == mp->m_dir_geo->fsbcount);
> +			}
>  			iocur_top->need_crc = 1;
> +write:
>  			ret = write_buf(iocur_top);
>  out_pop:
>  			pop_cur();
> 

  reply	other threads:[~2019-01-11 17:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 21:31 [PATCH v5 0/5] Try to squash metadump data leaks Stefan Ring
2018-11-05 21:31 ` [PATCH 1/5] xfs_metadump: Extend data zapping to XFS_DIR{2,3}_LEAFN_MAGIC blocks Stefan Ring
2018-12-20 22:20   ` Eric Sandeen
2018-11-05 21:31 ` [PATCH 2/5] xfs_metadump: Zap multi fsb blocks Stefan Ring
2019-01-03 17:55   ` Darrick J. Wong
2019-01-04 22:27     ` Stefan Ring
2019-01-04 23:11       ` Eric Sandeen
2018-11-05 21:31 ` [PATCH 3/5] xfs_metadump: Zap freeindex blocks in directory inodes Stefan Ring
2019-01-03 17:59   ` Darrick J. Wong
2018-11-05 21:31 ` [PATCH 4/5] xfs_metadump: Zap unused space in inode btrees Stefan Ring
2019-01-03 17:57   ` Darrick J. Wong
2018-11-05 21:31 ` [PATCH 5/5] xfs_metadump: Zap dev inodes Stefan Ring
2019-01-03 17:57   ` Darrick J. Wong
2018-12-06 17:04 ` [PATCH v5 0/5] Try to squash metadump data leaks Stefan Ring
2018-12-06 20:23   ` Eric Sandeen
2019-01-07 20:13 ` [PATCH v6 " Stefan Ring
2019-01-07 20:13   ` [PATCH 1/5] xfs_metadump: Extend data zapping to XFS_DIR{2,3}_LEAFN_MAGIC blocks Stefan Ring
2019-01-07 20:13   ` [PATCH 2/5] xfs_metadump: Zap multi fsb blocks Stefan Ring
2019-01-11 17:31     ` Eric Sandeen [this message]
2019-01-14 17:42       ` Stefan Ring
2019-01-14 17:46         ` Eric Sandeen
2019-01-07 20:13   ` [PATCH 3/5] xfs_metadump: Zap freeindex blocks in directory inodes Stefan Ring
2019-01-07 20:13   ` [PATCH 4/5] xfs_metadump: Zap unused space in inode btrees Stefan Ring
2019-01-07 20:13   ` [PATCH 5/5] xfs_metadump: Zap dev inodes Stefan Ring
  -- strict thread matches above, loose matches on Subject: below --
2018-10-26 20:19 [PATCH 0/5] v4 Try to squash metadump data leaks Stefan Ring
2018-10-26 20:19 ` [PATCH 2/5] xfs_metadump: Zap multi fsb blocks Stefan Ring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b4718eb-bf55-600e-2a42-1b3128bf21bf@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=linux-xfs@vger.kernel.org \
    --cc=stefanrin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).