public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox{,-backup} v2 00/10] keep datastore config unlock during long running operations
@ 2026-05-06 16:56 Christian Ebner
  2026-05-06 16:56 ` [PATCH proxmox v2 01/10] pbs-api-types: add datastore create maintenance-mode type Christian Ebner
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Christian Ebner @ 2026-05-06 16:56 UTC (permalink / raw)
  To: pbs-devel

Currently an s3-refresh for datastores backed by s3, mount and
unmount for removalbe datastores as well as datastore creation
(independent of datastore type) run while holding the datastore
config lock for consistency.
However, this also blocks config access by all unrelated datastores.

Instead, implement per-datastore locks for maintenance-mode changes,
and rely on block unexpected maintenance-mode changes during ongoing
operations. This allows to concurrently create datastores, run s3
refresh and perform mount/unmount without blocking config access longer
than necessary.

Based on a report in the community forum: https://forum.proxmox.com/threads/183244/

Changes since version 1 (thanks @Fabian for review):
- Fully reworked locking helpers for s3-refresh and mount/unmount operations
- Include new maintenance type create, used to unblock concurrent datastore creation
- Refactor and code cleanup, especially with respect to chunk store scope restriction


proxmox:

Christian Ebner (1):
  pbs-api-types: add datastore create maintenance-mode type

 pbs-api-types/src/datastore.rs   | 8 ++++++++
 pbs-api-types/src/maintenance.rs | 4 ++++
 2 files changed, 12 insertions(+)


proxmox-backup:

Christian Ebner (9):
  api: config: rearrange independent code block for datastore creation
  api/datastore: refactor datastore creation helper logic
  datastore: restrict chunk store scope to pbs-datastore crate
  datastore: move lock files base path constant to central location
  datastore: move file lock helper to centralized place
  datastore: create lockdir with correct mode for backup user access
  api/datastore: use maintenance-mode lock to protect against changes
  api: config: unlocked s3 bucket access check for datastore creation
  datastore: protect datastore creation by maintenance-mode

 pbs-datastore/src/backup_info.rs              |  36 +---
 pbs-datastore/src/chunk_store.rs              |  22 +--
 pbs-datastore/src/datastore.rs                | 127 ++++++++++++-
 pbs-datastore/src/lib.rs                      |  70 +++++++-
 .../src/local_datastore_lru_cache.rs          |   2 +-
 pbs-datastore/src/move_journal.rs             |   2 +-
 proxmox-backup-client/src/main.rs             |  15 +-
 src/api2/admin/datastore.rs                   |  67 +++----
 src/api2/config/datastore.rs                  | 167 ++++--------------
 src/api2/helpers.rs                           |  77 +++++++-
 src/api2/node/disks/directory.rs              |  27 ++-
 src/api2/node/disks/zfs.rs                    |  30 +++-
 12 files changed, 395 insertions(+), 247 deletions(-)


Summary over all repositories:
  14 files changed, 407 insertions(+), 247 deletions(-)

-- 
Generated by murpp 0.11.0




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

end of thread, other threads:[~2026-05-06 16:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 16:56 [PATCH proxmox{,-backup} v2 00/10] keep datastore config unlock during long running operations Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox v2 01/10] pbs-api-types: add datastore create maintenance-mode type Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 02/10] api: config: rearrange independent code block for datastore creation Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 03/10] api/datastore: refactor datastore creation helper logic Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 04/10] datastore: restrict chunk store scope to pbs-datastore crate Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 05/10] datastore: move lock files base path constant to central location Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 06/10] datastore: move file lock helper to centralized place Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 07/10] datastore: create lockdir with correct mode for backup user access Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 08/10] api/datastore: use maintenance-mode lock to protect against changes Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 09/10] api: config: unlocked s3 bucket access check for datastore creation Christian Ebner
2026-05-06 16:56 ` [PATCH proxmox-backup v2 10/10] datastore: protect datastore creation by maintenance-mode 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