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
@ -97,11 +97,7 @@ impl CatalogSet {
|
||||
) -> Result<(), Error> {
|
||||
match self.catalog {
|
||||
Some(ref mut catalog) => {
|
||||
catalog.start_chunk_archive(uuid, file_number, store)?;
|
||||
for digest in chunk_list {
|
||||
catalog.register_chunk(digest)?;
|
||||
}
|
||||
catalog.end_chunk_archive()?;
|
||||
catalog.register_chunk_archive(uuid, file_number, store, chunk_list)?;
|
||||
}
|
||||
None => bail!("no catalog loaded - internal error"),
|
||||
}
|
||||
|
Reference in New Issue
Block a user