Bug 147165 - [RHEL4] net-snmp truncates size of very large filesystems
[RHEL4] net-snmp truncates size of very large filesystems
Status: CLOSED DUPLICATE of bug 153101
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: net-snmp (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2005-02-04 11:49 EST by David Lehman
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-04 05:15:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Lehman 2005-02-04 11:49:37 EST
*** This bug has been split off bug 147164 ***

------- Original comment by Dave Lehman on 2005.02.04 11:45 -------

Description of problem:
Get_FSSize does the following calculation, casting the return value to a long:
(from agent/mibgroup/host/hr_filesys.c)
786  long
787  Get_FSSize(char *dev)
788  {
810                  if (statfs_buf.f_bsize == 512)
811                      return (statfs_buf.f_blocks/2);
812                  else
813                      return (statfs_buf.f_blocks*(statfs_buf.f_bsize/1024));

Since in RHEL4 f_blocks in struct stat can be a 64-bit value, even on 32-bit
platforms where long is 32 bits, this can potentially truncate filesystem size
with large filesystems.

Version-Release number of selected component (if applicable):

How reproducible:
Always if you have a partition that is > 4TB or so.

Steps to Reproduce:
1. use the host/hr_partition MIB to display the size of a very large fs
Actual results:
Size is truncated

Expected results:
Size is correct

Additional info:
Comment 1 Radek Vokal 2005-04-04 05:15:22 EDT

*** This bug has been marked as a duplicate of 153101 ***

Note You need to log in before you can comment on or make changes to this bug.