[pbs-devel] [PATCH proxmox-backup v2] GC: chunk store: fix chunk using markers cleanup
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Nov 25 15:23:30 CET 2025
Am 25.11.25 um 15:18 schrieb Fabian Grünbichler:
>> + if filename
>> + .to_bytes()
>> + .ends_with(USING_MARKER_FILENAME_EXT.as_bytes())
>> + {
>> + unlinkat(Some(dirfd), filename, UnlinkatFlags::NoRemoveDir).map_err(|err| {
>> + format_err!("unlinking chunk using marker {filename:?} failed - {err}")
>> + })?;
>> + drop(lock);
>> + continue;
>> + }
> this looks okay as a stop-gap, but isn't the actual problem that
>
> .using
>
> and
>
> .0.bad
>
> have the same length, so we end up taking a codepath using a weird "bad
> but not bad" filename instead of skipping those markers in phase3?
I mean, yes, but these .using markers would need to be cleaned (or updated to
ensure they match reality) sooner or later anyway, or does that already happen
elsewhere?
>
> in get_chunk_iterator, we skip all files that are not 64 bytes or
> 64+len(.0.bad) bytes long, but then set the "bad" flag based on the
> extension..
>
> and then in cond_sweep_chunk in sweep_unused_chunk, we convert non-bad
> chunk filenames to digests which then fails for the "using" filenames,
> because they are too long (per the error from the forum thread).
I mean, "using" is also not that of a telling suffix, "referenced" or
"remote" or the like might be better, even just "used" is slightly easier
to grasp for me.
More information about the pbs-devel
mailing list