public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup v2 0/4] fix sync level updates for chunk store
@ 2026-05-12  8:55 Christian Ebner
  2026-05-12  8:55 ` [PATCH proxmox-backup v2 1/4] datastore: restrict chunk store mutex scope to crate only Christian Ebner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Christian Ebner @ 2026-05-12  8:55 UTC (permalink / raw)
  To: pbs-devel

Currently the sync level configured for a datastore is only
propagated to the chunk store on first lookup, when the chunk
store instance is created. Updating the sync level in the tuning
options does invalidate the cached datastore entry, does however
not re-instantiate the chunk store, to avoid dropping the locks
acquired via the process locker. This means however the sync level
on the chunk store is not updated.

Fixed by storing the chunk store state inside the mutex, already
present for syncing up concurrent access to the chunk store. This
also improves the code style and fixes a few smaller issues
encountered.

Changes since version 1 (thanks @Robert for feedback!):
- Fix lost sync level update, move implementation into chunk store
  instead
- Only try ensuring the sync level if it actually changed and fix race
  window by taking the mutex guard for the check.
- Avoid Arc for chunk store mutex, it can be shared by reference
- Fixed typo


proxmox-backup:

Christian Ebner (4):
  datastore: restrict chunk store mutex scope to crate only
  datastore: avoid useless double borrowing of datastore
  datastore: move try_ensure_sync_level() implementation to chunk store
  datastore: fix sync level update propagation to chunk store

 pbs-datastore/src/chunk_store.rs              | 82 ++++++++++++++-----
 pbs-datastore/src/datastore.rs                | 52 +++++++-----
 .../src/local_datastore_lru_cache.rs          | 12 +--
 3 files changed, 98 insertions(+), 48 deletions(-)


Summary over all repositories:
  3 files changed, 98 insertions(+), 48 deletions(-)

-- 
Generated by murpp 0.11.0




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-12  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12  8:55 [PATCH proxmox-backup v2 0/4] fix sync level updates for chunk store Christian Ebner
2026-05-12  8:55 ` [PATCH proxmox-backup v2 1/4] datastore: restrict chunk store mutex scope to crate only Christian Ebner
2026-05-12  8:55 ` [PATCH proxmox-backup v2 2/4] datastore: avoid useless double borrowing of datastore Christian Ebner
2026-05-12  8:55 ` [PATCH proxmox-backup v2 3/4] datastore: move try_ensure_sync_level() implementation to chunk store Christian Ebner
2026-05-12  8:55 ` [PATCH proxmox-backup v2 4/4] datastore: fix sync level update propagation " Christian Ebner

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