public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v2 0/6] wait for active operations to finish before s3 refresh
Date: Wed, 12 Nov 2025 17:36:18 +0100	[thread overview]
Message-ID: <20251112163624.691139-1-c.ebner@proxmox.com> (raw)

Datastore contents located on the s3 backend can be refreshed on the local
datastore cache by running an s3-refresh, which will set the maintenance mode
s3-refresh to block any read/write operation and fetch the contents to a
temporary directory before moving them in place if the fetching was successful.

Setting the maintenance mode has however no effect on already active operations,
which can cause inconsistencies once the s3 refresh moves the temporary folders
in place.

Fix this by actively waiting for ongoing read/write operations to finish before
starting with the s3-refresh and locking the datastore config while the refresh
is ongoing, so the maintenance mode cannot be altered.

Changes since version 1 (thanks @Fabian for review):
- reuse and check for active operations based on unmount logic
- reuse and check for correct maintenance mode based on unmount logic

proxmox-backup:

Christian Ebner (6):
  api: datastore: fix typo in helper function name
  api: admin: make expected maintenance type helper generic over type
  api: admin: factor out busy waiting on active operations
  api: admin: factor out locking and maintenance mode clearing
  datastore: s3 refresh: set/unset maintenance mode in api handler
  api: datastore: wait for active operations to clear before s3 refresh

 pbs-datastore/src/datastore.rs |  31 +------
 src/api2/admin/datastore.rs    | 153 +++++++++++++++++++++++++--------
 2 files changed, 118 insertions(+), 66 deletions(-)


Summary over all repositories:
  2 files changed, 118 insertions(+), 66 deletions(-)

-- 
Generated by git-murpp 0.8.1


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


             reply	other threads:[~2025-11-12 16:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 16:36 Christian Ebner [this message]
2025-11-12 16:36 ` [pbs-devel] [PATCH proxmox-backup v2 1/6] api: datastore: fix typo in helper function name Christian Ebner
2025-11-12 16:36 ` [pbs-devel] [PATCH proxmox-backup v2 2/6] api: admin: make expected maintenance type helper generic over type Christian Ebner
2025-11-12 16:36 ` [pbs-devel] [PATCH proxmox-backup v2 3/6] api: admin: factor out busy waiting on active operations Christian Ebner
2025-11-13  8:15   ` Fabian Grünbichler
2025-11-13  8:38     ` Christian Ebner
2025-11-12 16:36 ` [pbs-devel] [PATCH proxmox-backup v2 4/6] api: admin: factor out locking and maintenance mode clearing Christian Ebner
2025-11-13  8:18   ` Fabian Grünbichler
2025-11-13  8:43     ` Christian Ebner
2025-11-13  9:08       ` Fabian Grünbichler
2025-11-13  9:11         ` Christian Ebner
2025-11-12 16:36 ` [pbs-devel] [PATCH proxmox-backup v2 5/6] datastore: s3 refresh: set/unset maintenance mode in api handler Christian Ebner
2025-11-12 16:36 ` [pbs-devel] [PATCH proxmox-backup v2 6/6] api: datastore: wait for active operations to clear before s3 refresh Christian Ebner
2025-11-13  8:15   ` Fabian Grünbichler
2025-11-13  9:03     ` Christian Ebner
2025-11-13  8:20 ` [pbs-devel] partially-applied: [PATCH proxmox-backup v2 0/6] wait for active operations to finish " Fabian Grünbichler
2025-11-13 14:23 ` [pbs-devel] superseded: " Christian 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=20251112163624.691139-1-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal