]> git.proxmox.com Git - proxmox-backup.git/commit
chunk store: handle insertion edge cases
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 31 Mar 2023 08:43:45 +0000 (10:43 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Apr 2023 07:36:51 +0000 (09:36 +0200)
commit42018aeae5078e86800e0b262ac416951d64b98c
treecb34a2fbdfa01e98535bbcd5144462be60758e79
parentdcae9925e12e4bb989dbc620b7f16fc49cdb7c89
chunk store: handle insertion edge cases

these were previously called out in a comment, but should now be handled (as
much as they can be).

the performance impact shouldn't be too bad, since we only look at the magic 8
bytes at the start of the existing chunk (we already did a stat on it, so that
might even be prefetched already by storage), and only if there is a size
mismatch and encryption is enabled.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 [ T: fold in "just to be sure" touch_chunk calls ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
pbs-datastore/src/chunk_store.rs
pbs-datastore/src/data_blob.rs