login
Header Space

 
 

What to do about the 2TB limit on HDIO_GETGEO ?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jens Axboe <axboe@...>, Jeff Garzik <jgarzik@...>, Tejun Heo <htejun@...>, Greg KH <gregkh@...>
Cc: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Linux Kernel <linux-kernel@...>, IDE/ATA development list <linux-ide@...>, linux-scsi <linux-scsi@...>
Date: Tuesday, March 25, 2008 - 12:02 am

(resending .. forgot to copy the lists originally)

We have a problem coming down the pipeline.

Practically all utilities that care about it,
use ioctl(fd, HDIO_GETGEO) to determine the starting
sector offset of a hard disk partition.

SCSI, libata, IDE, USB, Firewire.. you name it.

The return value uses "unsigned long",
which on a 32-bit system limits drive offsets to 2TB.

There will be single drives exceeding this limit within
the next 12 months or less, and we already have RAID arrays
that exceed 2TB.

So.. what's the replacement for HDIO_GETGEO on 32-bits ?

One candidate might seem to be the existing /sys/block/dev/partition/start
which I expect is already 64-bit friendly.

But this requires about 150 lines of somewhat complex C code to access,
using only the dev_t (from stat(2) on a file) as a starting point,
or less if one relies upon the udev device name matching the sysfs device name.

Is it time now for HDIO_GETGEO64 to make an appearance?
Similar to how the existing BLKGETSIZE64 is supplanting BLKGETSIZE ?

??
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
What to do about the 2TB limit on HDIO_GETGEO ?, Mark Lord, (Tue Mar 25, 12:02 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, James Bottomley, (Tue Mar 25, 11:17 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Greg Freemyer, (Tue Mar 25, 1:45 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Matt Domsch, (Sun Mar 30, 12:28 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Randy Dunlap, (Tue Mar 25, 1:52 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Matthew Wilcox, (Tue Mar 25, 2:09 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Boaz Harrosh, (Wed Mar 26, 5:58 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Mark Lord, (Tue Mar 25, 1:31 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, James Bottomley, (Tue Mar 25, 3:32 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Tue Mar 25, 1:13 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Mark Lord, (Tue Mar 25, 9:37 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Tue Mar 25, 9:55 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Mark Lord, (Tue Mar 25, 1:37 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Mark Lord, (Tue Mar 25, 8:34 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Kay Sievers, (Thu Mar 27, 2:51 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Thu Mar 27, 2:55 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Kay Sievers, (Thu Mar 27, 3:03 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Tejun Heo, (Tue Mar 25, 8:54 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Kay Sievers, (Thu Mar 27, 3:29 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Thu Mar 27, 3:38 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Dan Williams, (Fri Apr 11, 7:25 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Andrew Morton, (Tue Apr 15, 3:18 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, James Bottomley, (Tue Apr 15, 10:20 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Tue Apr 15, 2:16 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Dan Williams, (Tue Apr 15, 7:43 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Mark Lord, (Tue Apr 15, 9:47 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Tejun Heo, (Wed Mar 26, 12:24 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Wed Mar 26, 2:04 am)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Randy Dunlap, (Tue Mar 25, 3:34 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Tue Mar 25, 4:36 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Tue Mar 25, 5:26 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Matthew Wilcox, (Thu Mar 27, 3:05 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, H. Peter Anvin, (Tue Mar 25, 7:05 pm)
Re: What to do about the 2TB limit on HDIO_GETGEO ?, Andrew Morton, (Tue Mar 25, 12:19 am)
speck-geostationary