Add missing esc_tag() in status and parity split log tags

This commit is contained in:
Andrea Mazzoleni 2026-08-17 19:02:15 +02:00
parent e9f9603207
commit 1ffafc8c0a
4 changed files with 10 additions and 9 deletions

View file

@ -291,9 +291,9 @@ static int parity_handle_grow(struct snapraid_split_handle* split, data_off_t pr
#endif
if (ret != 0)
log_tag("split:grow:%s:%" PRIu64 ": failed with error %s\n", split->path, size, strerror(errno));
log_tag("split:grow:%s:%" PRIu64 ": failed with error %s\n", esc_tag(split->path), size, strerror(errno));
else
log_tag("split:grow:%s:%" PRIu64 ": ok\n", split->path, size);
log_tag("split:grow:%s:%" PRIu64 ": ok\n", esc_tag(split->path), size);
return ret;
}
@ -305,9 +305,9 @@ static int parity_handle_shrink(struct snapraid_split_handle* split, data_off_t
ret = ftruncate(split->f, size);
if (ret != 0)
log_tag("split:shrink:%s:%" PRIu64 ": failed with error %s\n", split->path, size, strerror(errno));
log_tag("split:shrink:%s:%" PRIu64 ": failed with error %s\n", esc_tag(split->path), size, strerror(errno));
else
log_tag("split:shrink:%s:%" PRIu64 ": ok\n", split->path, size);
log_tag("split:shrink:%s:%" PRIu64 ": ok\n", esc_tag(split->path), size);
return ret;
}
@ -395,7 +395,7 @@ static int parity_handle_fill(struct snapraid_split_handle* split, data_off_t si
/* size we have to increase */
delta = size - base;
log_tag("split:fill:%s:%" PRIu64 ":%" PRIu64 ":\n", split->path, base, size);
log_tag("split:fill:%s:%" PRIu64 ":%" PRIu64 ":\n", esc_tag(split->path), base, size);
/* grow the size one bit at time, like a kind of binary search */
while (delta != 0) {
@ -405,7 +405,7 @@ static int parity_handle_fill(struct snapraid_split_handle* split, data_off_t si
/* mask out the bit we process */
delta &= ~run;
log_tag("split:delta:%s:%" PRIu64 ":%" PRIu64 ":\n", split->path, base, run);
log_tag("split:delta:%s:%" PRIu64 ":%" PRIu64 ":\n", esc_tag(split->path), base, run);
ret = parity_handle_grow(split, base, base + run, skip_fallocate);
if (ret != 0) {