Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Changes | 2 +-
lib/Sys/Virt.xs | 5 +++++
lib/Sys/Virt/Domain.pm | 4 ++++
3 files changed, 10 insertions(+), 1 deletion(-)
Pushed as a build fix
diff --git a/Changes b/Changes
index 74bbb22..4c77425 100644
--- a/Changes
+++ b/Changes
@@ -2,7 +2,7 @@ Revision history for perl module Sys::Virt
4.6.0 2018-00-00
- - XXX
+ - Add VIR_DOMAIN_MEMORY_STAT_DISK_CACHES
4.5.0 2018-07-03
diff --git a/lib/Sys/Virt.xs b/lib/Sys/Virt.xs
index 40134d3..14967d7 100644
--- a/lib/Sys/Virt.xs
+++ b/lib/Sys/Virt.xs
@@ -5850,6 +5850,10 @@ memory_stats(dom, flags=0)
case VIR_DOMAIN_MEMORY_STAT_USABLE:
(void)hv_store (RETVAL, "usable", 6, virt_newSVll(stats[i].val),
0);
break;
+
+ case VIR_DOMAIN_MEMORY_STAT_DISK_CACHES:
+ (void)hv_store (RETVAL, "disk_caches", 11,
virt_newSVll(stats[i].val), 0);
+ break;
}
}
Safefree(stats);
@@ -9040,6 +9044,7 @@ BOOT:
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_RSS, MEMORY_STAT_RSS);
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE, MEMORY_STAT_LAST_UPDATE);
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_USABLE, MEMORY_STAT_USABLE);
+ REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_DISK_CACHES, MEMORY_STAT_DISK_CACHES);
REGISTER_CONSTANT_STR(VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC,
BLOCK_IOTUNE_TOTAL_BYTES_SEC);
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index 284c38c..8eee18c 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -3903,6 +3903,10 @@ Amount of usable memory
Time of last stats refresh from guest
+=item Sys::Virt::Domain::MEMORY_STAT_DISK_CACHES
+
+Disk cache size
+
=back
=head2 DOMAIN LIST CONSTANTS
--
2.17.1