diff mbox

[3/3] btrfs-progs: remove meaningless debug info for restore

Message ID 1409192755-1826-3-git-send-email-guihc.fnst@cn.fujitsu.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Gui Hecheng Aug. 28, 2014, 2:25 a.m. UTC
The printf of @offset enlightens the user little.
And the restore cmd is not a debugging tool, so just
remove the debug-info-like printf.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
---
 cmds-restore.c | 2 --
 1 file changed, 2 deletions(-)

Comments

David Sterba Aug. 29, 2014, 2:49 p.m. UTC | #1
On Thu, Aug 28, 2014 at 10:25:55AM +0800, Gui Hecheng wrote:
> The printf of @offset enlightens the user little.
> And the restore cmd is not a debugging tool, so just
> remove the debug-info-like printf.

I'd like to let the restore command be more verbose as it's potentially
working with a broken filesystem and getting details can help. There's
-v option for increasing verbosity, please move the printf there.

Thaks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gui Hecheng Sept. 1, 2014, 1:35 a.m. UTC | #2
On Fri, 2014-08-29 at 16:49 +0200, David Sterba wrote:
> On Thu, Aug 28, 2014 at 10:25:55AM +0800, Gui Hecheng wrote:
> > The printf of @offset enlightens the user little.
> > And the restore cmd is not a debugging tool, so just
> > remove the debug-info-like printf.
> 
> I'd like to let the restore command be more verbose as it's potentially
> working with a broken filesystem and getting details can help. There's
> -v option for increasing verbosity, please move the printf there.

OK?since the -v option seems to serve as a debug helper.

> Thaks.


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/cmds-restore.c b/cmds-restore.c
index 918f1fb..648fbc9 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -310,8 +310,6 @@  static int copy_one_extent(struct btrfs_root *root, int fd,
 	if (compress == BTRFS_COMPRESS_NONE)
 		bytenr += offset;
 
-	if (offset)
-		printf("offset is %Lu\n", offset);
 	/* we found a hole */
 	if (disk_size == 0)
 		return 0;