public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox Backup Server development discussion"
	<pbs-devel@lists.proxmox.com>,
	"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v2] GC: chunk store: fix chunk using markers cleanup
Date: Tue, 25 Nov 2025 15:23:30 +0100	[thread overview]
Message-ID: <f143f432-5f00-4a9b-ac9d-022eab772fa9@proxmox.com> (raw)
In-Reply-To: <1764080186.d9oxoqi5dh.astroid@yuna.none>

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.


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

  reply	other threads:[~2025-11-25 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 14:00 Christian Ebner
2025-11-25 14:18 ` Fabian Grünbichler
2025-11-25 14:23   ` Thomas Lamprecht [this message]
2025-11-25 14:27   ` Christian Ebner
2025-11-26  8:23     ` Fabian Grünbichler
2025-11-25 15:02 ` [pbs-devel] applied: " Thomas Lamprecht

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=f143f432-5f00-4a9b-ac9d-022eab772fa9@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal