lkml.org 
[lkml]   [1998]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: IDE disk geometry + patch
    From ptb@it.uc3m.es Sat Dec  5 12:22:11 1998

The detailed instructions on what to do
when you have a disk reporting X and it is really Y
have always been almost completely incomprehensible to me.

I always stress: NEVER say `and it is really Y'.
There is no reality, and if there is one you do not
want to know about it. E.g., the number of sectors on the
outside rim of your disk is larger that that on the inside.
So "the number of sectors per track" is not a constant.
The numbers (c,h,s) have nothing at all to do with the
physical cylinders or heads on the disk.

So, the goal of fiddling with the geometry is not to
approach reality, but to make everybody who is using
the disk happy at the same time, with the same fake
geometry. That can be tricky when you have many
different operating systems on the same disk.



what IS all that blah blah in the docs about? I've just looked at (Mark
Lord's) documentation in ide.txt and failed to understand it again.

Nevertheless almost all of it is precisely correct.
But if you do not have a problem, don't worry.
Most of this concerns problems of the past.


> [If you still have these Fujitsus you can check whether
> the change I suggested avoids your complete muddle in
> all cases, regardless of BIOS settings.]

Please send again.

> Now the fragment of ide.c:do_identify()
> in 2.0.36 or ide-disk.c:idedisk_setup() in 2.1.130
>
> /* Correct the number of cyls if the bios value is too small */
> if (drive->sect == drive->bios_sect && drive->head == drive->bios_head) {
> if (drive->cyl > drive->bios_cyl)
> drive->bios_cyl = drive->cyl;
> }
>
> does not update drive->bios_cyl since drive->head != drive->bios_head.
> So, I propose that the above fragment be changed into something like
>
> /* Set the cylinder count - the BIOS reported value may be too small */
> if (drive->bios_sect && drive->bios_head)
> drive->bios_cyl = capacity / (drive->bios_sect * drive->bios_head);
>
> where `capacity' is current_capacity(drive) in the 2.0.36 source,
> and idedisk_capacity(drive) in the 2.1.130 source.


Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.038 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site