@cryptotaxi247 / netdata-1 / commits / a9a56efc2

do not add iso9660 filesystems be default; fixes #1350

Costa Tsaousis (ktsaou) committed Dec 11, 2016 at 02:15 UTC a9a56efc28e646ad7fa4c9a03de5b253ff15cdb0
1 file changed +7 -3
src/proc_diskstats.c
+7 -3
@@ -129,7 +129,7 @@ struct mount_point_metadata {
129 int do_inodes;
130 };
131
132 -static inline void do_disk_space_stats(struct disk *d, const char *mount_point, const char *mount_source, const char *disk, const char *family, int update_every, unsigned long long dt) {
132 +static inline void do_disk_space_stats(struct disk *d, const char *mount_point, const char *mount_source, const char *disk, const char *family, const char *filesystem, int update_every, unsigned long long dt) {
133 (void)dt;
134
135 static DICTIONARY *mount_points = NULL;
@@ -172,6 +172,10 @@ static inline void do_disk_space_stats(struct disk *d, const char *mount_point,
172 def_space = CONFIG_ONDEMAND_NO;
173 def_inodes = CONFIG_ONDEMAND_NO;
174 }
175 + else if(unlikely(filesystem && !strcmp(filesystem, "iso9660"))) {
176 + def_space = CONFIG_ONDEMAND_NO;
177 + def_inodes = CONFIG_ONDEMAND_NO;
178 + }
179
180 do_space = config_get_boolean_ondemand(var_name, "space usage", def_space);
181 do_inodes = config_get_boolean_ondemand(var_name, "inodes usage", def_inodes);
@@ -868,7 +872,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
872 // space metrics
873
874 if(unlikely( d->mount_point && (d->do_space || d->do_inodes) )) {
871 - do_disk_space_stats(d, d->mount_point, disk, disk, family, update_every, dt);
875 + do_disk_space_stats(d, d->mount_point, disk, disk, family, NULL, update_every, dt);
876 }
877 */
878 }
@@ -898,7 +902,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
902 // fprintf(stderr, "Will process mount point '%s', source '%s', filesystem '%s'\n", mi->mount_point, mi->mount_source, mi->filesystem);
903 */
904
901 - do_disk_space_stats(NULL, mi->mount_point, mi->mount_source, mi->persistent_id, mi->mount_point , update_every, dt);
905 + do_disk_space_stats(NULL, mi->mount_point, mi->mount_source, mi->persistent_id, mi->mount_point, mi->filesystem, update_every, dt);
906 }
907
908 return 0;