mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-03-07 00:58:32 +03:00
tape: continue without MAM media_usage page
sometimes we cannot parse these pages (e.g. vendor quirks that implement the field differently) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
6fa3ab297f
commit
a7900d6e0b
@ -911,11 +911,16 @@ impl SgTape {
|
||||
status.block_number = Some(position.logical_object_number);
|
||||
|
||||
if let Ok(mam) = self.cartridge_memory() {
|
||||
let usage = mam_extract_media_usage(&mam)?;
|
||||
|
||||
status.manufactured = Some(usage.manufactured);
|
||||
status.bytes_read = Some(usage.bytes_read);
|
||||
status.bytes_written = Some(usage.bytes_written);
|
||||
match mam_extract_media_usage(&mam) {
|
||||
Ok(usage) => {
|
||||
status.manufactured = Some(usage.manufactured);
|
||||
status.bytes_read = Some(usage.bytes_read);
|
||||
status.bytes_written = Some(usage.bytes_written);
|
||||
}
|
||||
Err(err) => {
|
||||
log::warn!("unable to get MAM media usage: {err}");
|
||||
}
|
||||
}
|
||||
|
||||
if let Ok(volume_stats) = self.volume_statistics() {
|
||||
let passes = std::cmp::max(
|
||||
|
Loading…
x
Reference in New Issue
Block a user