linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: B.Zolnierkiewicz@elka.pw.edu.pl, aebr@win.tue.nl
Cc: alan@lxorguk.ukuu.org.uk, andersen@codepoet.org,
	linux-kernel@vger.kernel.org, marcelo@conectiva.com.br
Subject: Re: [PATCH] ide-disk.c rev 1.13 killed CONFIG_IDEDISK_STROKE
Date: Thu, 7 Aug 2003 11:57:49 +0200 (MEST)	[thread overview]
Message-ID: <UTC200308070957.h779vnj22394.aeb@smtp.cwi.nl> (raw)

    > The part I most object to are things like
    >
    > > +    id->lba_capacity_2 = capacity_2 = set_max_ext;
    >
    > There have been many problems in the past, and it is a bad idea to add
    > more of this. We should be eliminating all cases.

    What problems?  This reflects real change in drive's identify
    and I think should be replaced by rereading drive->id from a drive.

In order to be able to troubleshoot problems we need to be able
to reconstruct the information involved.

One part is the disk identity info that existed at boot time.
It was read by the kernel, and stored. It is returned by the
HDIO_GET_IDENTIFY ioctl, as used in e.g. hdparm -i.

There is also the current disk identity info.
It is found by asking the disk now, and is returned by e.g. hdparm -I.

    > We have info from BIOS, user, disk etc and conclude
    > to a certain geometry.

    I can't spot place when we get info from a BIOS.

See arch/i386/boot/setup.S
(I ripped out ide-geometry.c recently, so the use has diminished.)

    > Sneakily changing what the disk reported is very ugly. I recall a case
    > where a disk bounced between two capacities because the value that this
    > computation concluded to was not a fixed point. Also, the user gets an
    > incorrect report from HDIO_GET_IDENTITY.

    User gets correct report from HDIO_GET_IDENTIFY as drive's identify was
    really changed.  Moreover HDIO_GET_IDENTIFY needs fixing to actually
    reread drive->id from a drive (similarly like /proc identify was fixed).

There are at least two objections.
First: we do not want the new identity, we want the old.
Second: if we ask the disk for identity again, you'll see that
more than this single field was changed.

If the user only wanted to know the current max size then there are
other means, like BLKGETSIZE.

    > So, the clean way is to examine what the disk reported, never change it

    Even if disk's info changes?  I don't think so.

Yes. The disk geometry data that we use is drive->*
What the disk reported to us is drive->id->*.


Andries

             reply	other threads:[~2003-08-07  9:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-07  9:57 Andries.Brouwer [this message]
2003-08-07 10:44 ` [PATCH] ide-disk.c rev 1.13 killed CONFIG_IDEDISK_STROKE Bartlomiej Zolnierkiewicz
  -- strict thread matches above, loose matches on Subject: below --
2003-08-07 13:22 Andries.Brouwer
2003-08-07 13:50 ` Bartlomiej Zolnierkiewicz
2003-08-07 11:23 Andries.Brouwer
2003-08-07 11:49 ` Bartlomiej Zolnierkiewicz
2003-08-07  1:59 Andries.Brouwer
     [not found] <20030806181142.GD25910@codepoet.org>
2003-08-06 18:32 ` Bartlomiej Zolnierkiewicz
2003-08-06 19:30   ` Erik Andersen
2003-08-06 19:58     ` Bartlomiej Zolnierkiewicz
2003-08-07  1:11   ` Andries Brouwer
2003-08-07  2:31     ` Bartlomiej Zolnierkiewicz
2003-08-02 12:45 Andries Brouwer
2003-08-02 13:10 ` Bartlomiej Zolnierkiewicz
2003-08-02 17:42   ` Andries Brouwer
2003-08-02 21:06     ` Alan Cox
2003-08-02 23:34       ` [PATCH] " Erik Andersen
2003-08-03  1:26         ` Andries Brouwer
2003-08-03  2:12           ` Erik Andersen
2003-08-03  9:52         ` Jens Axboe

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=UTC200308070957.h779vnj22394.aeb@smtp.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=aebr@win.tue.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andersen@codepoet.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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;
as well as URLs for NNTP newsgroup(s).