From: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH storage v3 1/4] fix #3972: Remove the .notes file when a backup is deleted
Date: Wed, 25 May 2022 18:25:44 +0200 [thread overview]
Message-ID: <55ccbbae-7aac-8da1-710d-53312439bf39@proxmox.com> (raw)
In-Reply-To: <f76c316e-53e4-8133-b529-a87ec1f2b24f@proxmox.com>
On 5/25/22 17:06, Thomas Lamprecht wrote:
> On 20/05/2022 15:28, Daniel Tschlatscher wrote:
>> When a VM or Container backup was deleted, the .notes file was not
>> removed, therefore, over time the dump folder would get polluted with
>> notes for backups that no longer existed. As backup names contain a
>> timestamp and as the notes cannot be reused because of this, I think
>> it is safe to just delete them just like we do with the .log file.
>>
>> Furthermore, I sourced the deletion of the log and notes file into a
>> new function called "archive_auxiliaries_remove". Additionally, the
>> archive_info object now returns one more field containing the name of
>> the notes file. The test cases have to be adapted to expect this new
>> value as the package will not compile otherwise.
>>
>> Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
>> ---
> the "changes since v2" sections are missing from all patches, making it
> harder to check if all comments got addressed or what other changes there
> were...
>
>> PVE/API2/Storage/Content.pm | 5 ++---
>> PVE/Storage.pm | 20 +++++++++++++++-----
>> test/archive_info_test.pm | 6 ++++++
>> 3 files changed, 23 insertions(+), 8 deletions(-)
>>
Sorry for that, the changes from v2 are:
- Test cases are now part of the initial commit to make it compilable by
itself.
- File 'unlink' now checks whether the file is already gone to avoid
errors when removals are racing
- The code to 'unlink' the files was made a bit more concise and DRY by
utilizing a loop
- Instead of plain 'warn' now use 'log_warn()'
- The file extensions for '.notes' and '.log' files now use constants
declared in 'PVE::Storage::Plugin'
next prev parent reply other threads:[~2022-05-25 16:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 13:28 Daniel Tschlatscher
2022-05-20 13:28 ` [pve-devel] [PATCH storage v3 2/4] fix #3972: Adapted unlink calls for archive files in case of ENOENT Daniel Tschlatscher
2022-06-13 8:34 ` Fabian Ebner
2022-05-20 13:28 ` [pve-devel] [PATCH storage v3 3/4] fix #3972: Switched to using log_warn of PVE::RESTEnvironment Daniel Tschlatscher
2022-06-13 8:34 ` Fabian Ebner
2022-05-20 13:28 ` [pve-devel] [PATCH storage v3 4/4] Added a LOG_EXT constant as a counterpart to NOTES_EXT Daniel Tschlatscher
2022-06-13 8:34 ` Fabian Ebner
2022-05-25 15:06 ` [pve-devel] [PATCH storage v3 1/4] fix #3972: Remove the .notes file when a backup is deleted Thomas Lamprecht
2022-05-25 16:25 ` Daniel Tschlatscher [this message]
2022-06-13 8:33 ` Fabian Ebner
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=55ccbbae-7aac-8da1-710d-53312439bf39@proxmox.com \
--to=d.tschlatscher@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@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