From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfs_metadump: don't zero log if not obfuscating
Date: Mon, 22 Jun 2015 08:36:32 -0500 [thread overview]
Message-ID: <55880F60.9030800@redhat.com> (raw)
The earlier commit:
ec693e1 metadump: zero out clean log
ignored the "obfuscate" state, but there's no reason to
zero out the log if we're not obfuscating; all the other
metadata is in the clear, so we may as well keep it around
in the log as well.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
(this is for the progs-misc-fixes-1 branch)
diff --git a/db/metadump.c b/db/metadump.c
index eb5e9da..bdc48a0 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -2184,6 +2184,10 @@ copy_log(void)
return !stop_on_read_error;
}
+ /* If not obfuscating, just copy the log as it is */
+ if (!obfuscate)
+ goto done;
+
dirty = xlog_is_dirty(mp, &x, 0);
switch (dirty) {
@@ -2196,18 +2200,17 @@ copy_log(void)
break;
case 1:
/* keep the dirty log */
- if (obfuscate)
- print_warning(
+ print_warning(
_("Filesystem log is dirty; image will contain unobfuscated metadata in log."));
break;
case -1:
/* log detection error */
- if (obfuscate)
- print_warning(
+ print_warning(
_("Could not discern log; image will contain unobfuscated metadata in log."));
break;
}
+done:
return !write_buf(iocur_top);
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2015-06-22 13:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 13:36 Eric Sandeen [this message]
2015-06-24 13:00 ` [PATCH] xfs_metadump: don't zero log if not obfuscating Brian Foster
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=55880F60.9030800@redhat.com \
--to=sandeen@redhat.com \
--cc=xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.