Blame SOURCES/net-snmp-5.7-dsktable-cache.patch

8a419f
877326 - dskEntry should be cached
8a419f
8a419f
commit ca7b17a41d4d16bd27aacf92116bea3562eeea36
8a419f
Author: Jan Safranek <jsafranek@users.sourceforge.net>
8a419f
Date:   Mon Dec 17 12:40:32 2012 +0100
8a419f
8a419f
    CHANGES: snmpd: use cache for dskTable to speed it up.
8a419f
    
8a419f
    UCD-SNMP::dskTable was slow on NFS mounts. Now it uses fsys cache
8a419f
    to reload mounts every 5 seconds.
8a419f
8a419f
diff --git a/agent/mibgroup/ucd-snmp/disk_hw.c b/agent/mibgroup/ucd-snmp/disk_hw.c
8a419f
index 93ecde3..ea37610 100644
8a419f
--- a/agent/mibgroup/ucd-snmp/disk_hw.c
8a419f
+++ b/agent/mibgroup/ucd-snmp/disk_hw.c
8a419f
@@ -305,8 +305,11 @@ var_extensible_disk(struct variable *vp,
8a419f
     unsigned long long val;
8a419f
     static long     long_ret;
8a419f
     static char     errmsg[300];
8a419f
+    netsnmp_cache  *cache;
8a419f
 
8a419f
-    netsnmp_fsys_load( NULL, NULL );  /* Update the fsys H/W module */
8a419f
+    /* Update the fsys H/W module */
8a419f
+    cache = netsnmp_fsys_get_cache();
8a419f
+    netsnmp_cache_check_and_reload(cache);
8a419f
 
8a419f
 tryAgain:
8a419f
     if (header_simple_table