From: Eric Sandeen <sandeen@sandeen.net>
To: Eric Sandeen <sandeen@redhat.com>, xfs@oss.sgi.com
Subject: [PATCH 3/4] xfsprogs: rename dont_obfuscate in xfs_metadump
Date: Fri, 29 May 2015 14:13:24 -0500 [thread overview]
Message-ID: <5568BA54.3060302@sandeen.net> (raw)
In-Reply-To: <5568B7CE.9030709@redhat.com>
Seeing "if (!dont_obfuscate)" hurts my brain; rename it to
"obfuscate" and invert the logic.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
db/metadump.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/db/metadump.c b/db/metadump.c
index b227a6d..57b53d9 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -74,7 +74,7 @@ static xfs_ino_t cur_ino;
static int show_progress = 0;
static int stop_on_read_error = 0;
static int max_extent_size = DEFAULT_MAX_EXT_SIZE;
-static int dont_obfuscate = 0;
+static int obfuscate = 1;
static int show_warnings = 0;
static int progress_since_warning = 0;
@@ -1368,7 +1368,7 @@ process_single_fsb_objects(
}
- if (dont_obfuscate)
+ if (!obfuscate)
goto write;
dp = iocur_top->data;
@@ -1460,7 +1460,7 @@ process_multi_fsb_objects(
}
- if (dont_obfuscate || o >= mp->m_dir_geo->leafblk) {
+ if (!obfuscate || o >= mp->m_dir_geo->leafblk) {
ret = write_buf(iocur_top);
goto out_pop;
}
@@ -1725,7 +1725,7 @@ process_inode_data(
{
switch (dip->di_format) {
case XFS_DINODE_FMT_LOCAL:
- if (!dont_obfuscate)
+ if (obfuscate)
switch (itype) {
case TYP_DIR2:
obfuscate_sf_dir(dip);
@@ -1769,7 +1769,7 @@ process_inode(
cur_ino = XFS_AGINO_TO_INO(mp, agno, agino);
/* we only care about crc recalculation if we are obfuscating names. */
- if (!dont_obfuscate) {
+ if (obfuscate) {
crc_was_ok = xfs_verify_cksum((char *)dip,
mp->m_sb.sb_inodesize,
offsetof(struct xfs_dinode, di_crc));
@@ -1801,7 +1801,7 @@ process_inode(
switch (dip->di_aformat) {
case XFS_DINODE_FMT_LOCAL:
need_new_crc = 1;
- if (!dont_obfuscate)
+ if (obfuscate)
obfuscate_sf_attr(dip);
break;
@@ -2247,7 +2247,7 @@ metadump_f(
}
break;
case 'o':
- dont_obfuscate = 1;
+ obfuscate = 0;
break;
case 'w':
show_warnings = 1;
-- 1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-05-29 19:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 19:02 [PATCH 0/4] xfsprogs: mini patch-bomb Eric Sandeen
2015-05-29 19:03 ` [PATCH 1/4] xfsprogs: remove unused write-only var l_logsize Eric Sandeen
2015-06-03 17:11 ` Brian Foster
2015-05-29 19:06 ` [PATCH 2/4] xfsprogs: add xlog_is_empty() helper Eric Sandeen
2015-06-03 17:11 ` Brian Foster
2015-05-29 19:13 ` Eric Sandeen [this message]
2015-06-03 17:11 ` [PATCH 3/4] xfsprogs: rename dont_obfuscate in xfs_metadump Brian Foster
2015-05-29 19:17 ` [PATCH 4/4] xfsprogs: zero out clean log " Eric Sandeen
2015-06-03 17:11 ` Brian Foster
2015-06-03 20:01 ` Eric Sandeen
2015-06-08 15:06 ` [PATCH 4/4 V2] " Eric Sandeen
2015-06-08 18:29 ` Brian Foster
2015-06-08 18:32 ` Eric Sandeen
2015-06-09 23:35 ` Dave Chinner
2015-06-08 18:46 ` [PATCH 4/4 V3] " Eric Sandeen
2015-06-08 18:50 ` 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=5568BA54.3060302@sandeen.net \
--to=sandeen@sandeen.net \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox