linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Ring <stefanrin@gmail.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 1/2] xfs_metadump: Extend zapping to multi fsb dir blocks
Date: Thu, 11 Oct 2018 21:44:23 +0200	[thread overview]
Message-ID: <20181011194424.20306-2-stefanrin@gmail.com> (raw)
In-Reply-To: <20181011194424.20306-1-stefanrin@gmail.com>

The processing for data zeroing was never added to process_multi_fsb_objects.
It is now the same thing that process_single_fsb_objects does.
---
 db/metadump.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/db/metadump.c b/db/metadump.c
index cc2ae9af..ff96860d 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -1862,6 +1862,7 @@ process_multi_fsb_objects(
 	typnm_t		btype,
 	xfs_fileoff_t	last)
 {
+	char		*dp;
 	int		ret = 0;
 
 	switch (btype) {
@@ -1902,14 +1903,16 @@ process_multi_fsb_objects(
 
 			}
 
-			if ((!obfuscate && !zero_stale_data) ||
-			     o >= mp->m_dir_geo->leafblk) {
-				ret = write_buf(iocur_top);
-				goto out_pop;
+			dp = iocur_top->data;
+			if (o >= mp->m_dir_geo->freeblk) {
+				process_dir_free_block(dp);
+			} 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);
 			}
 
-			process_dir_data_block(iocur_top->data, o,
-					       last == mp->m_dir_geo->fsbcount);
 			iocur_top->need_crc = 1;
 			ret = write_buf(iocur_top);
 out_pop:
-- 
2.14.4

  reply	other threads:[~2018-10-12  3:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 19:44 [PATCH v3 0/2] Try to squash metadump data leaks Stefan Ring
2018-10-11 19:44 ` Stefan Ring [this message]
2018-10-23 15:10   ` [PATCH 1/2] xfs_metadump: Extend zapping to multi fsb dir blocks Eric Sandeen
2018-10-25 15:08     ` Eric Sandeen
2018-10-25 16:44       ` Stefan Ring
2018-10-11 19:44 ` [PATCH 2/2] xfs_metadump: Zap more stale data Stefan Ring
2018-10-23 15:49   ` Darrick J. Wong
2018-10-25 16:42     ` Stefan Ring
2018-10-26 20:23       ` Stefan Ring
2018-10-26  5:32     ` Stefan Ring
2018-10-25 15:50 ` [PATCH v3 0/2] Try to squash metadump data leaks Eric Sandeen
2018-10-26  0:36   ` Eric Sandeen
2018-10-26  5:29     ` Stefan Ring
2018-10-26 12:36       ` Eric Sandeen
2018-10-26 18:37         ` Stefan Ring
  -- strict thread matches above, loose matches on Subject: below --
2018-10-11 19:23 [PATCH v2 " Stefan Ring
2018-10-11 19:23 ` [PATCH 1/2] xfs_metadump: Extend zapping to multi fsb dir 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=20181011194424.20306-2-stefanrin@gmail.com \
    --to=stefanrin@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    /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).