hierachy: ListAccessibleBackupGroups make store also a lifetime'd ref

avoid some extra Arc::clone, even if they're not really expensive
(just some atomics)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2022-05-14 14:56:32 +02:00
parent cbde538c0c
commit 7da520ae46
3 changed files with 6 additions and 6 deletions

View File

@ -599,7 +599,7 @@ pub fn list_snapshots(
fn get_snapshots_count(store: &Arc<DataStore>, owner: Option<&Authid>) -> Result<Counts, Error> {
let root_ns = Default::default();
ListAccessibleBackupGroups::new(Arc::clone(store), root_ns, MAX_NAMESPACE_DEPTH, owner)?
ListAccessibleBackupGroups::new(store, root_ns, MAX_NAMESPACE_DEPTH, owner)?
.try_fold(Counts::default(), |mut counts, group| {
let group = match group {
Ok(group) => group,
@ -1059,7 +1059,7 @@ pub fn prune_datastore(
let to_stdout = rpcenv.env_type() == RpcEnvironmentType::CLI;
// FIXME: also allow a per-namespace pruning with max-depth
// FIXME: add max-depth
let upid_str = WorkerTask::new_thread(
"prune",