[pbs-devel] [PATCH proxmox-backup v1 2/3] fix: datastore: move manifest locking to new locking method

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Apr 7 10:52:01 CEST 2022


On Wed, Apr 06, 2022 at 11:39:54AM +0200, Stefan Sterz wrote:
> adds double stat'ing and removes directory hierarchy to bring manifest
> locking in-line with other locks used by the datastore trait.
> 
> Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
> ---
>  pbs-datastore/src/datastore.rs | 46 +++++++++++++---------------------
>  1 file changed, 18 insertions(+), 28 deletions(-)
> 
> diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
> index cb2a8a4e..619e2710 100644
> --- a/pbs-datastore/src/datastore.rs
> +++ b/pbs-datastore/src/datastore.rs
> @@ -30,9 +30,7 @@ use crate::dynamic_index::{DynamicIndexReader, DynamicIndexWriter};
>  use crate::fixed_index::{FixedIndexReader, FixedIndexWriter};
>  use crate::index::IndexFile;
>  use crate::manifest::{
> -    MANIFEST_BLOB_NAME, MANIFEST_LOCK_NAME, CLIENT_LOG_BLOB_NAME,
> -    ArchiveType, BackupManifest,
> -    archive_type,
> +    archive_type, ArchiveType, BackupManifest, CLIENT_LOG_BLOB_NAME, MANIFEST_BLOB_NAME,
>  };
>  
>  lazy_static! {
> @@ -811,38 +809,30 @@ impl DataStore {
>      ///
>      /// Also creates the basedir. The lockfile is located in
>      /// '/run/proxmox-backup/locks/{datastore}/{type}/{id}/{timestamp}.index.json.lck'

^ The comment is now wrong ;-)





More information about the pbs-devel mailing list