Description of problem: The 32-bit compatibility GETBLKSIZE ioctl on 64-bit kernels truncates the 64-bit long return value to 32-bits. Unfortunately, this wraps back to zero at the 2TB point, returning an incorrect device size. On a 32-bit kernel, the ioctl returns an EFBIG error on such an overflow, allowing the application to fall back on an alternative method of determining the device size (such as the GETBLKSIZE64 ioctl.) Version-Release number of selected component (if applicable): kernel-2.6.9-6.37.EL How reproducible: 100% Steps to Reproduce: 1. Run the "verify-data" tool with "verify-data -Q /dev/$dev" on a device larger than 2TB (see http://people.redhat.com/sct/src/verify-data/ ) Actual results: GETBLKSIZE returns incorrect size Expected results: GETBLKSIZE returns EFBIG
This has only been seen in internal testing of >2TB devices. It will be encountered any time a 32-bit application attempts to determine device size on a 64-bit kernel for devices >2TB.
Created attachment 114897 [details] Fix EFBIG for 32-bit GETBLKSIZE ioctl compatibility
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2005-514.html