diff options
author | Amar Tumballi <amarts@redhat.com> | 2018-10-29 14:16:20 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-11-01 02:38:39 +0000 |
commit | 7fac81aeab5805fb2bd719d7489636633bb5e32a (patch) | |
tree | 793a81e96849918fec893a5c78ba83ff8e703d79 /libglusterfs/src/monitoring.c | |
parent | 7150c51ad75ccba22045a35fc31e5037612d1ad4 (diff) |
mem-pool: change the values to 64bits
total_allocs of certain type of variables can be 4billion in a
single day depending on load. So, 32 bits for that is not enough.
Also, size_t is good variable size for one allocation, but the
sum of allocations, should be 64bits to make sure we don't
overflow the variable.
Updates: bz#1639599
Change-Id: If3b19687f94425e913a0201ae5d73661eda51f06
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/monitoring.c')
-rw-r--r-- | libglusterfs/src/monitoring.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libglusterfs/src/monitoring.c b/libglusterfs/src/monitoring.c index b0d0766599a..5f11827b187 100644 --- a/libglusterfs/src/monitoring.c +++ b/libglusterfs/src/monitoring.c @@ -34,10 +34,7 @@ dump_mem_acct_details(xlator_t *xl, int fd) mem_rec = &xl->mem_acct->rec[i]; if (mem_rec->num_allocs == 0) continue; - dprintf(fd, - "# %s, %" GF_PRI_SIZET ", %u, %" GF_PRI_SIZET - ", %u," - " %u\n", + dprintf(fd, "# %s, %" PRIu64 ", %u, %" PRIu64 ", %u, %" PRIu64 "\n", mem_rec->typestr, mem_rec->size, mem_rec->num_allocs, mem_rec->max_size, mem_rec->max_num_allocs, mem_rec->total_allocs); |