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.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Filipe Manana 2022-11-15 16:25:25 +00:00 committed by David Sterba
parent 4c847b5133
commit 77e0684029
1 changed files with 5 additions and 0 deletions

View File

@ -1295,6 +1295,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);