File ganglia-0008-support-fs-size-for-ZFS-on-Linux.patch of Package ganglia
xxxxxxxxxx
1
From: Ben Kurtz <bkurtz@ucsd.edu>
2
Date: Thu, 10 Mar 2016 22:38:27 -0800
3
Git-commit: 1c85925e5b1ae99f08c44ea2b3b9567c21f3de9f
4
References: bsc#1087487
5
Subject: [PATCH] support fs size for ZFS on Linux
6
7
ZFS mounts don't start with '/dev/', so look out for that when skipping mount entries
8
Acked-by: John Jolly <jjolly@suse.de>
9
---
10
libmetrics/linux/metrics.c | 3 ++-
11
1 file changed, 2 insertions(+), 1 deletion(-)
12
13
diff --git a/libmetrics/linux/metrics.c b/libmetrics/linux/metrics.c
14
index 62e7314b..dec85483 100644
15
--- a/libmetrics/linux/metrics.c
16
+++ b/libmetrics/linux/metrics.c
17
18
if (!strncmp(mode, "ro", 2)) continue;
19
if (remote_mount(device, type)) continue;
20
if (strncmp(device, "/dev/", 5) != 0 &&
21
- strncmp(device, "/dev2/", 6) != 0) continue;
22
+ strncmp(device, "/dev2/", 6) != 0 &&
23
+ strncmp(type, "zfs", 3) != 0) continue;
24
thispct = device_space(mount, device, total_size, total_free);
25
debug_msg("Counting device %s (%.2f %%)", device, thispct);
26
if (!max || max<thispct)
27
--
28
2.13.6
29
30