Red Hat Bugzilla – Bug 238918
blockdev --getsize does not work properly on devices with more than 2^31 sectors
Last modified: 2007-11-30 17:12:03 EST
Description of problem:
Given a device with more than 2147483648 sectors (i.e. 2^31), blockdev --getsize
prints the size as a negative number.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Find a device that is bigger than 1TB (or stitch one together via dmsetup)
2. blockdev --getsize /the/device
A negative number
A positive number
The BLKGETSIZE ioctl returns a 32-bit unsigned value, but the blockdev program
is using a signed integer, so any value over 2^31 flips negative.
Uff.. the blockdev is really blind. Thanks for your report.
util-linux-2.13-0.54.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.
util-linux-2.13-0.54.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.