Trying dedup 007

This commit is contained in:
theherodied
2018-03-23 22:10:30 -04:00
parent 97a3d611ee
commit b30a3edb49
2 changed files with 4 additions and 2 deletions

View File

@@ -34,9 +34,10 @@ if (is_array($tegile_storage)) {
//Tegile uses a high 32bit counter and a low 32bit counter to make a 64bit counter. Size units are in bytes
$size = (($storage['poolSizeHigh'] << 32 ) + $storage['poolSizeLow']) * $units;
$used = (($storage['poolUsedSizeHigh'] << 32 ) + $storage['poolUsedSizeLow']) * $units;
$dedup = (($storage['poolPostDedupDataSizeHigh'] << 32 ) + $storage['poolPostDedupDataSizeLow']) * $units;
if (is_numeric($index)) {
discover_storage($valid_storage, $device, $index, $fstype, 'tegile', $descr, $size, $units, $used);
discover_storage($valid_storage, $device, $index, $fstype, 'tegile', $descr, $size, $units, $used, $dedup);
}
unset($deny, $fstype, $descr, $size, $used, $units, $storage_rrd, $old_storage_rrd, $hrstorage_array);
unset($deny, $fstype, $descr, $size, $used, $dedup, $units, $storage_rrd, $old_storage_rrd, $hrstorage_array);
}
}

View File

@@ -31,4 +31,5 @@ $storage['units'] = 1;
//Tegile uses a high 32bit counter and a low 32bit counter to make a 64bit counter. Storage units are in bytes.
$storage['size'] = (($entry['poolSizeHigh'] << 32 ) + $entry['poolSizeLow']) * $storage['units'];
$storage['used'] = (($entry['poolUsedSizeHigh'] << 32 ) + $entry['poolUsedSizeLow']) * $storage['units'];
$storage['dedup'] = (($entry['poolPostDedupDataSizeHigh'] << 32 ) + $entry['poolPostDedupDataSizeLow']) * $storage['units'];
$storage['free'] = ($storage['size'] - $storage['used']);