public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@cfl.rr.com>
To: Seewer Philippe <philippe.seewer@bfh.ch>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC: disk geometry via sysfs
Date: Mon, 13 Feb 2006 14:34:10 -0500	[thread overview]
Message-ID: <43F0DF32.8060709@cfl.rr.com> (raw)
In-Reply-To: <43F0D7AD.8050909@bfh.ch>

Seewer Philippe wrote:
> ...Thats why I said i didn't want to start another geometry war. But
> then again, I did write RFC too, yes?
>
> Yes, geometry is a fiction. And a bad one at that. To be honest I'd
> rather get rid of it completely. But you said it: The geometry still
> exists for the sake of backward compatibility. If it is still there, why
> not export it? That's what sysfs is for...
>   

Because AFAIK, the kernel does not know the geometry.  To find out you 
have to ask the bios, and calling the bios is a no-no.  That's assuming 
the disk is even visible to the bios. 
> Additionally have a look at libata-scsi.c which is part of the SATA
> implementation. Theres CHS code in there...
>
> Personally I want the geometry information in sysfs because debugging
> partition tables not written by linux tools becomes just that tad more
> easier...
>
>   
The geometry expressed in the partition table by whatever utility 
created it will be the geometry that the bios reported the disk had at 
the time the tool created the MBR, which can change if you plug the disk 
into another machine with different bios.  If there is already geometry 
in the MBR, then you should use those values and take them at face value.

> I did not say I'd implement it for _all_ devices. In fact I indent to
> make geometry available only for devices whose drivers provide the
> getgeo function.
>
>   
AFAIK, most drivers do provide a getgeo function... but do they get the 
information from the bios at boot time, or do they make it up?  If it is 
just made up anyhow, then why bother?  I am not sure how it could even 
be possible to get the information from the bios at boot time, and 
figure out the correct mapping between bios devices and the real 
hardware, which the driver is talking to.  Since the geometry is 
entirely made up anyhow why bother asking the driver to make it up when 
that can be done in user space just as easily?
> Exactly. I don't want the kernel to fix BIOS problems. But i want to
> give userland the opportunity to overwrite what the kernel thinks (as in
> /proc/ide/hdx/settings).
> One example where this might be usable is connecting a PATA drive using
> an Adapter to SATA. PATA returns the drive's geometry. SATA defaults to
> x/255/63...
But neither one is any more correct than the other.  Both are bogus 
values, so what does it matter which is used?  What good would having 
this value stored in the kernel do?  The kernel itself does not use it.  
User mode tools that for some reason need to talk about it can just use 
the values stored in the MBR. 




  parent reply	other threads:[~2006-02-13 19:35 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10 13:06 RFC: disk geometry via sysfs Seewer Philippe
2006-02-13  9:56 ` Bartlomiej Zolnierkiewicz
2006-02-15  7:57   ` Seewer Philippe
2006-02-13 16:32 ` Phillip Susi
2006-02-13 19:02   ` Seewer Philippe
2006-02-13 19:22     ` linux-os (Dick Johnson)
2006-02-13 19:36       ` Phillip Susi
2006-02-14 16:35         ` Seewer Philippe
2006-02-13 19:34     ` Phillip Susi [this message]
     [not found]       ` <43F206E7.70601@bfh.ch>
2006-02-14 18:19         ` Phillip Susi
2006-02-15  8:39           ` Seewer Philippe
2006-02-15  8:51             ` Bartlomiej Zolnierkiewicz
2006-02-15  9:01               ` Seewer Philippe
2006-02-15 14:06                 ` Alan Cox
2006-02-15 14:11                   ` Seewer Philippe
2006-02-15 15:15                     ` Alan Cox
2006-02-15 15:29                       ` Phillip Susi
2006-02-16  8:12                         ` Seewer Philippe
2006-02-16 15:36                           ` Phillip Susi
2006-02-16 15:41                             ` Seewer Philippe
2006-02-16 16:15                               ` Phillip Susi
2006-02-15 15:20                   ` Phillip Susi
2006-02-15 16:06                     ` Alan Cox
2006-02-15 16:20                       ` Phillip Susi
2006-02-15 17:32                         ` Alan Cox
2006-02-15 18:43                           ` Phillip Susi
2006-02-15 19:23                             ` linux-os (Dick Johnson)
2006-02-15 20:54                               ` Phillip Susi
2006-02-15 21:41                                 ` linux-os (Dick Johnson)
2006-02-15 22:43                                   ` Phillip Susi
2006-02-16 12:33                                     ` linux-os (Dick Johnson)
2006-02-16 15:26                                       ` Phillip Susi
2006-02-16 16:15                                         ` Seewer Philippe
2006-02-16 17:01                                           ` Phillip Susi
2006-02-16 16:39                                         ` linux-os (Dick Johnson)
2006-02-16 17:09                                           ` Phillip Susi
2006-02-16 19:01                                             ` linux-os (Dick Johnson)
2006-02-16 19:55                                               ` Phillip Susi
2006-02-16  8:18                           ` Seewer Philippe
2006-02-16 18:14                       ` Matt Domsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43F0DF32.8060709@cfl.rr.com \
    --to=psusi@cfl.rr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philippe.seewer@bfh.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox