tape: only query volume stats if we can read MAM
This commit is contained in:
parent
ef942e04c2
commit
c4b2b9ab41
@ -238,16 +238,16 @@ impl LinuxTapeHandle {
|
||||
status.manufactured = Some(usage.manufactured);
|
||||
status.bytes_read = Some(usage.bytes_read);
|
||||
status.bytes_written = Some(usage.bytes_written);
|
||||
}
|
||||
|
||||
if let Ok(volume_stats) = self.volume_statistics() {
|
||||
if let Ok(volume_stats) = self.volume_statistics() {
|
||||
|
||||
status.medium_passes = Some(std::cmp::max(
|
||||
volume_stats.beginning_of_medium_passes,
|
||||
volume_stats.middle_of_tape_passes,
|
||||
));
|
||||
status.medium_passes = Some(std::cmp::max(
|
||||
volume_stats.beginning_of_medium_passes,
|
||||
volume_stats.middle_of_tape_passes,
|
||||
));
|
||||
|
||||
status.volume_mounts = Some(volume_stats.volume_mounts);
|
||||
status.volume_mounts = Some(volume_stats.volume_mounts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user