Bug 238918 - blockdev --getsize does not work properly on devices with more than 2^31 sectors
blockdev --getsize does not work properly on devices with more than 2^31 sectors
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-03 16:40 EDT by David Shaw
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-02 08:17:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Shaw 2007-05-03 16:40:50 EDT
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):

util-linux-2.13-0.46.fc6

How reproducible:

Steps to Reproduce:
1. Find a device that is bigger than 1TB (or stitch one together via dmsetup)
2. blockdev --getsize /the/device
  
Actual results:

A negative number

Expected results:

A positive number

Additional info:

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.
Comment 1 Karel Zak 2007-05-29 03:47:36 EDT
Uff.. the blockdev is really blind. Thanks for your report.
Comment 2 Fedora Update System 2007-08-09 12:49:26 EDT
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.
Comment 3 Fedora Update System 2007-08-24 01:45:55 EDT
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.

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