Re: What to do about the 2TB limit on HDIO_GETGEO ?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mark Lord
Date: Tuesday, March 25, 2008 - 5:34 pm

Greg KH wrote:
..

So have we.  sysfs is a total nightmare to extract information from
under program / script control.  The idea presented in this thread,
is to have it cross-index the contents with a method that actually
makes it easy to access in many common scenarios, without requiring
huge gobs of code in user space.  Or in kernel space.

And it's not just a few 10s of lines of code currently,
but rather about 80-100 lines just to find the correct device subdir,
and *then* a few more 10s of lines of code to retrieve the value.

In a bulletproof fashion, that is.  Sure it can be slightly smaller
if niceties such as error checking/handling are omitted.

There's no guarantee that udev is present, and even if it were present,
there's no guarantee that the names in /dev/ will match /sysfs/ pathnames,
since udev is very configurable to do otherwise.

So lookups are by dev_t, which sysfs has no simple or even easy way
of accomplishing.  O(n) at a minimum.

If we make it easier to access, then more programs will use it
rather than us having to expand our tricky binary ioctl interfaces.

Isn't that part of the idea of sysfs -- to limit the need for new ioctls ?

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