Bug 147373 - ioctl BLKGETSIZE64 (hdparm -g) returns garbage
Summary: ioctl BLKGETSIZE64 (hdparm -g) returns garbage
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-07 18:28 UTC by Jan Kratochvil
Modified: 2015-01-04 22:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-07 22:29:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Kratochvil 2005-02-07 18:28:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6)
Gecko/20050111

Description of problem:
Linux kernels detects disk/partition size correctly but
ioctl(BLKGETSIZE64) being used by hdparm(8) reports wrong number.
Software Captive NTFS fails to operate on such disks.


Version-Release number of selected component (if applicable):
kernel-2.6.10-1.760_FC3

How reproducible:
Always

Steps to Reproduce:
1. cat /sys/block/hda/size
2. hdparm -g /dev/hda


Actual Results:  398297088

/dev/hda:
 geometry     = 24792/255/63, sectors = 203928109056, start = 0


Expected Results:  398297088

/dev/hda:
 geometry     = 24792/255/63, sectors = 398297088, start = 0


Additional info:

IDE block device "struct inode"->i_size contains the bogus size info.
I expect this Linux kernel bug is not Fedora-specific.

Comment 1 Jan Kratochvil 2005-02-07 22:28:41 UTC
It is a hdparm(8) bug as it should label it "bytes", not "sectors".
BLKGETSIZE64 always returned bytes and now returns bytes.
BLKGETSIZE always returned sectors and now returns sectors.
Nothing changed.



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