All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_metadump: don't zero log if not obfuscating
@ 2015-06-22 13:36 Eric Sandeen
  2015-06-24 13:00 ` Brian Foster
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2015-06-22 13:36 UTC (permalink / raw)
  To: xfs-oss

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs_metadump: don't zero log if not obfuscating
  2015-06-22 13:36 [PATCH] xfs_metadump: don't zero log if not obfuscating Eric Sandeen
@ 2015-06-24 13:00 ` Brian Foster
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Foster @ 2015-06-24 13:00 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On Mon, Jun 22, 2015 at 08:36:32AM -0500, Eric Sandeen wrote:
> 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>
> ---

Reviewed-by: Brian Foster <bfoster@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

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-24 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 13:36 [PATCH] xfs_metadump: don't zero log if not obfuscating Eric Sandeen
2015-06-24 13:00 ` Brian Foster

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.