From 4e6d18589dc8cba4c8414a2f03c14c31bd400a6c Mon Sep 17 00:00:00 2001 Message-Id: <4e6d18589dc8cba4c8414a2f03c14c31bd400a6c.1668799549.git.boris@bur.io> In-Reply-To: References: From: Filipe Manana Date: Tue, 15 Nov 2022 16:25:25 +0000 Subject: [PATCH 2/3] btrfs-progs: receive: add debug messages when processing fallocate 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 Reviewed-by: Boris Burkov --- cmds/receive.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmds/receive.c b/cmds/receive.c index ce615e7c..9f73b072 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.38.1