[pbs-devel] [PATCH v5 proxmox-backup 29/31] datastore: increment deleted group counter when removing group

Christian Ebner c.ebner at proxmox.com
Fri Oct 18 10:42:40 CEST 2024


To correctly account also for the number of deleted backup groups, in
preparation to correctly return the delete statistics when removing
contents via the REST API.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 4:
- no changes

changes since version 3:
- no changes

 pbs-datastore/src/backup_info.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pbs-datastore/src/backup_info.rs b/pbs-datastore/src/backup_info.rs
index 222134074..62d12b118 100644
--- a/pbs-datastore/src/backup_info.rs
+++ b/pbs-datastore/src/backup_info.rs
@@ -221,6 +221,7 @@ impl BackupGroup {
             std::fs::remove_dir_all(&path).map_err(|err| {
                 format_err!("removing group directory {:?} failed - {}", path, err)
             })?;
+            delete_stats.increment_removed_groups();
         }
 
         Ok(delete_stats)
-- 
2.39.5





More information about the pbs-devel mailing list