linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: restore: Remove stale debug message
@ 2025-06-12  0:22 Marcos Paulo de Souza
  2025-06-12  0:34 ` Qu Wenruo
  2025-06-20 16:34 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Marcos Paulo de Souza @ 2025-06-12  0:22 UTC (permalink / raw)
  To: linux-btrfs; +Cc: wqu, dsterba, anand.jain, Marcos Paulo de Souza

The message was introduced on 502d2872
("btrfs-progs: restore: add global verbose option"), and it was never
changed. The debug message shows the offset of one  EXTENT_DATA from
the file being restore, but it's only shown when it's not zero.

This field is non zero when the extent was first snapshoted (or a
subvolume was created), and later changed partially, so the extent was
split in the part that remained the same and the one that changed.

It's not useful to have this message being printed without proper
context to the end user. The message itself isn't very useful in
debugging sessions, since it would be necessary more data about a
problematic file/extent. And given that the message is here for
more than 5 years being unnecessary printed, it's better to remove it
since it can annoy the users.

If a problem appears at this point in the code, a more appropriate debug
code could be introduced instead.

Link: https://github.com/kdave/btrfs-progs/issues/920
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 cmds/restore.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cmds/restore.c b/cmds/restore.c
index 6bc619b3..464a7079 100644
--- a/cmds/restore.c
+++ b/cmds/restore.c
@@ -391,8 +391,6 @@ static int copy_one_extent(struct btrfs_root *root, int fd,
 		size_left -= offset;
 	}
 
-	pr_verbose(offset ? 1 : 0, "offset is %llu\n", offset);
-
 	inbuf = malloc(size_left);
 	if (!inbuf) {
 		error_msg(ERROR_MSG_MEMORY, NULL);
-- 
2.49.0


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

* Re: [PATCH] btrfs-progs: restore: Remove stale debug message
  2025-06-12  0:22 [PATCH] btrfs-progs: restore: Remove stale debug message Marcos Paulo de Souza
@ 2025-06-12  0:34 ` Qu Wenruo
  2025-06-20 16:34 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2025-06-12  0:34 UTC (permalink / raw)
  To: Marcos Paulo de Souza, linux-btrfs; +Cc: wqu, dsterba, anand.jain



在 2025/6/12 09:52, Marcos Paulo de Souza 写道:
> The message was introduced on 502d2872
> ("btrfs-progs: restore: add global verbose option"), and it was never
> changed. The debug message shows the offset of one  EXTENT_DATA from
> the file being restore, but it's only shown when it's not zero.
> 
> This field is non zero when the extent was first snapshoted (or a
> subvolume was created), and later changed partially, so the extent was
> split in the part that remained the same and the one that changed.
> 
> It's not useful to have this message being printed without proper
> context to the end user. The message itself isn't very useful in
> debugging sessions, since it would be necessary more data about a
> problematic file/extent. And given that the message is here for
> more than 5 years being unnecessary printed, it's better to remove it
> since it can annoy the users.
> 
> If a problem appears at this point in the code, a more appropriate debug
> code could be introduced instead.
> 
> Link: https://github.com/kdave/btrfs-progs/issues/920
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>   cmds/restore.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/cmds/restore.c b/cmds/restore.c
> index 6bc619b3..464a7079 100644
> --- a/cmds/restore.c
> +++ b/cmds/restore.c
> @@ -391,8 +391,6 @@ static int copy_one_extent(struct btrfs_root *root, int fd,
>   		size_left -= offset;
>   	}
>   
> -	pr_verbose(offset ? 1 : 0, "offset is %llu\n", offset);
> -
>   	inbuf = malloc(size_left);
>   	if (!inbuf) {
>   		error_msg(ERROR_MSG_MEMORY, NULL);


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

* Re: [PATCH] btrfs-progs: restore: Remove stale debug message
  2025-06-12  0:22 [PATCH] btrfs-progs: restore: Remove stale debug message Marcos Paulo de Souza
  2025-06-12  0:34 ` Qu Wenruo
@ 2025-06-20 16:34 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2025-06-20 16:34 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: linux-btrfs, wqu, dsterba, anand.jain

On Wed, Jun 11, 2025 at 09:22:44PM -0300, Marcos Paulo de Souza wrote:
> The message was introduced on 502d2872
> ("btrfs-progs: restore: add global verbose option"), and it was never
> changed. The debug message shows the offset of one  EXTENT_DATA from
> the file being restore, but it's only shown when it's not zero.
> 
> This field is non zero when the extent was first snapshoted (or a
> subvolume was created), and later changed partially, so the extent was
> split in the part that remained the same and the one that changed.
> 
> It's not useful to have this message being printed without proper
> context to the end user. The message itself isn't very useful in
> debugging sessions, since it would be necessary more data about a
> problematic file/extent. And given that the message is here for
> more than 5 years being unnecessary printed, it's better to remove it
> since it can annoy the users.
> 
> If a problem appears at this point in the code, a more appropriate debug
> code could be introduced instead.
> 
> Link: https://github.com/kdave/btrfs-progs/issues/920
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

Added to devel, thanks.

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

end of thread, other threads:[~2025-06-20 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12  0:22 [PATCH] btrfs-progs: restore: Remove stale debug message Marcos Paulo de Souza
2025-06-12  0:34 ` Qu Wenruo
2025-06-20 16:34 ` David Sterba

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).