public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan <alan@lxorguk.ukuu.org.uk>
To: avl@logic.at
Cc: linux-kernel@vger.kernel.org
Subject: Re: possible bug in ide-disk.c (2.6.18.2 but also older)
Date: Tue, 21 Nov 2006 12:06:14 +0000	[thread overview]
Message-ID: <20061121120614.06073ce8@localhost.localdomain> (raw)
In-Reply-To: <20061121115117.GU6851@gamma.logic.tuwien.ac.at>

> After reading it a second time, I'll see if I got it straight now:
> 
> .) the kernel always loads even-aligned pairs of sectors.
> .) for an odd-sectored disk, this results in the GPT plus the
>      following (non-existent) sector being accessed from disk.

Yes

> .) the old, unmaintained ide-driver generally does not handle
>      the odd-size case right, as it misinterprets the harddisks
>      error for the second sector (the one after the end) as a
>      general error causing dma to be turned off, after some retries.
>      It would also do that, if I later accessed the last sector
>      (e.g. dd if=/dev/hda ..., or by accessing a file that happens
>      to be stored there per filesystem, if at all possible),
>      not just during the initial GPT-check.

Only ever seen during the partition check

> .) If I remove the "addr++;", then the harddisk is actually
>      believed to be 1 sector smaller than it really is, which
>      means that it looks like an even-sized disk. This could mean
>      that an eventually existing GPT could be missed. What would
>      be the "worst-case" consequences?
> .) if ((old ide-driver) && (odd # of sectors)) youre_doomed_anyway(); ?

Not in any normal situation it appears, just the partition code seems to
trip it up.

  reply	other threads:[~2006-11-21 12:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-20 14:51 possible bug in ide-disk.c (2.6.18.2 but also older) Andreas Leitgeb
2006-11-20 15:25 ` Alan
2006-11-20 16:56   ` Andreas Leitgeb
2006-11-20 17:28     ` Alan
2006-11-20 17:57       ` Andreas Leitgeb
2006-11-20 18:12         ` Alan
2006-11-21 11:51       ` Andreas Leitgeb
2006-11-21 12:06         ` Alan [this message]
2006-11-22 10:57           ` Andreas Leitgeb
2006-11-23 17:05             ` Andreas Leitgeb
2006-11-27 13:09               ` hpa-problem in ide-disk.c - new insights Andreas Leitgeb
2006-11-27 13:30                 ` Alan
2006-11-27 16:01                   ` Allow turning off hpa-checking Andreas Leitgeb
2006-11-27 16:33                     ` Alan
2006-11-27 17:56                       ` Andreas Leitgeb
2006-11-27 18:10                         ` Alan
2006-11-27 18:29                           ` Andreas Leitgeb
2006-11-27 19:59                             ` Alan
2006-11-28  9:29                               ` Andreas Leitgeb
2006-11-28  9:46                                 ` Tejun Heo
2006-11-28 12:09                                   ` Andreas Leitgeb
2006-11-28 12:24                                     ` Tejun Heo
2006-12-14 14:45                                       ` Andreas Leitgeb

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=20061121120614.06073ce8@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=avl@logic.at \
    --cc=linux-kernel@vger.kernel.org \
    /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