From: Boris Burkov <boris@bur.io>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/3] btrfs-progs: receive: add debug messages when processing fallocate
Date: Tue, 15 Nov 2022 12:46:10 -0800 [thread overview]
Message-ID: <Y3P6kndoSY1EellE@zen> (raw)
In-Reply-To: <7125ba99d511229e958daa14e385224e342b8a5c.1668529099.git.fdmanana@suse.com>
On Tue, Nov 15, 2022 at 04:25:25PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> Unlike for commands from the v1 stream, we have no debug messages logged
> when processing fallocate commands, which makes it harder to debug issues.
>
> So add log messages, when the log verbosity level is >= 3, for fallocate
> commands, mentioning the value of all fields.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Boris Burkov <boris@bur.io>
> ---
> cmds/receive.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/cmds/receive.c b/cmds/receive.c
> index b75a5634..e6f1aeab 100644
> --- a/cmds/receive.c
> +++ b/cmds/receive.c
> @@ -1296,6 +1296,11 @@ static int process_fallocate(const char *path, int mode, u64 offset, u64 len,
> struct btrfs_receive *rctx = user;
> char full_path[PATH_MAX];
>
> + if (bconf.verbose >= 3)
> + fprintf(stderr,
> + "fallocate %s - offset=%llu, len=%llu, mode=%d\n",
> + path, offset, len, mode);
> +
> ret = path_cat_out(full_path, rctx->full_subvol_path, path);
> if (ret < 0) {
> error("fallocate: path invalid: %s", path);
> --
> 2.35.1
>
next prev parent reply other threads:[~2022-11-15 20:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 16:25 [PATCH 0/3] btrfs-progs: receive: fix a silent data loss bug with encoded writes fdmanana
2022-11-15 16:25 ` [PATCH 1/3] btrfs-progs: receive: add debug messages when processing " fdmanana
2022-11-15 20:45 ` Boris Burkov
2022-11-15 16:25 ` [PATCH 2/3] btrfs-progs: receive: add debug messages when processing fallocate fdmanana
2022-11-15 20:46 ` Boris Burkov [this message]
2022-11-15 16:25 ` [PATCH 3/3] btrfs-progs: receive: fix silent data loss after fall back from encoded write fdmanana
2022-11-15 20:45 ` Boris Burkov
2022-11-15 16:37 ` [PATCH 0/3] btrfs-progs: receive: fix a silent data loss bug with encoded writes Christoph Anton Mitterer
2022-11-15 16:47 ` Filipe Manana
2022-11-15 16:53 ` Christoph Anton Mitterer
2022-11-16 10:50 ` Filipe Manana
2022-11-16 17:03 ` Christoph Anton Mitterer
2022-11-15 16:50 ` there should be some better way to inform interested people about data corruption issues Christoph Anton Mitterer
2022-11-23 18:55 ` [PATCH 0/3] btrfs-progs: receive: fix a silent data loss bug with encoded writes David Sterba
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=Y3P6kndoSY1EellE@zen \
--to=boris@bur.io \
--cc=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/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.