tape: media_catalog: improve chunk_archive interface
instead of having a public start/end_chunk_archive and register_chunks, simply expose a 'register_chunk_archive' method since we always have a list of chunks anywhere we want to add them Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
9a1ecae0b7
commit
a2ef36d445
@ -1121,16 +1121,13 @@ fn restore_archive<'a>(
|
||||
};
|
||||
|
||||
if let Some(chunks) = chunks {
|
||||
catalog.start_chunk_archive(
|
||||
catalog.register_chunk_archive(
|
||||
Uuid::from(header.uuid),
|
||||
current_file_number,
|
||||
&source_datastore,
|
||||
&chunks[..],
|
||||
)?;
|
||||
for digest in chunks.iter() {
|
||||
catalog.register_chunk(&digest)?;
|
||||
}
|
||||
task_log!(worker, "register {} chunks", chunks.len());
|
||||
catalog.end_chunk_archive()?;
|
||||
catalog.commit_if_large()?;
|
||||
}
|
||||
return Ok(());
|
||||
|
Reference in New Issue
Block a user