public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup 0/4] don't hold datastore config lock during s3-refresh
@ 2026-05-05  8:11 Christian Ebner
  2026-05-05  8:11 ` [PATCH proxmox-backup 1/4] pbs-config: reorganize crate use statements Christian Ebner
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Christian Ebner @ 2026-05-05  8:11 UTC (permalink / raw)
  To: pbs-devel

Currently an s3-refresh runs while holding the datastore config lock,
with the intention to block from accidentail leaving the
corresponding maintenance mode, assuring consistency.
However, this also blocks config access by all unrelated datastores,
similar to mount/unmount for removable datastores, but for s3-refresh
this is not acceptable since it can take significantly more time or
block on network issues until timeouts are reached.

Instead, implement per-datastore locks for maintenance-mode changes,
and rely on these to block unexpected maintenance-mode changes.

The first 3 patches are code style and refactoring only, the last patch
actually introduces the maintenance-mode locks.

Reported in the community forum: https://forum.proxmox.com/threads/183244/

Christian Ebner (4):
  pbs-config: reorganize crate use statements
  datastore: move lock files base path constant to central location
  datastore: move file lock helper to centralized place
  api/datastore: use maintenance-mode lock to protect against changes

 pbs-config/src/lib.rs             | 18 +++++++------
 pbs-datastore/src/backup_info.rs  | 36 ++-----------------------
 pbs-datastore/src/chunk_store.rs  |  5 ++--
 pbs-datastore/src/datastore.rs    |  2 ++
 pbs-datastore/src/lib.rs          | 45 +++++++++++++++++++++++++++++++
 pbs-datastore/src/move_journal.rs |  2 +-
 src/api2/admin/datastore.rs       | 26 +++++++++++++-----
 src/api2/config/datastore.rs      |  6 ++++-
 8 files changed, 87 insertions(+), 53 deletions(-)

-- 
2.47.3





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

end of thread, other threads:[~2026-05-05 13:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05  8:11 [PATCH proxmox-backup 0/4] don't hold datastore config lock during s3-refresh Christian Ebner
2026-05-05  8:11 ` [PATCH proxmox-backup 1/4] pbs-config: reorganize crate use statements Christian Ebner
2026-05-05 12:15   ` applied: " Fabian Grünbichler
2026-05-05  8:11 ` [PATCH proxmox-backup 2/4] datastore: move lock files base path constant to central location Christian Ebner
2026-05-05  8:11 ` [PATCH proxmox-backup 3/4] datastore: move file lock helper to centralized place Christian Ebner
2026-05-05 12:15   ` Fabian Grünbichler
2026-05-05  8:11 ` [PATCH proxmox-backup 4/4] api/datastore: use maintenance-mode lock to protect against changes Christian Ebner
2026-05-05 12:14   ` Fabian Grünbichler
2026-05-05 13:02     ` 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