public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Andries Brouwer <aeb@veritas.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-kernel@vger.rutgers.edu, mtd@infradead.org
Subject: Re: HDIO_GETGEO vs. BLKGETSIZE
Date: Mon, 22 May 2000 16:17:56 +0200	[thread overview]
Message-ID: <20000522161756.A23047@veritas.com> (raw)
In-Reply-To: <29342.958997177@devel2.axiom.internal>; from dwmw2@infradead.org on Mon, May 22, 2000 at 01:06:17PM +0100

On Mon, May 22, 2000 at 01:06:17PM +0100, David Woodhouse wrote:

> Is it permitted for a driver to returns CHS values for HDIO_GETGEO which, 
> when multiplied together, don't match the value returned by BLKGETSIZE?

Yes - HDIO_GETGEO may contain whatever you want.
A modern fdisk will use the values for heads and sectors/track
given by HDIO_GETGEO, but ignore the value for cylinders.

Indeed, since cylinders is a 16-bit field and the number of cylinders
can be larger than 65535, the value may be truncated, and is to be
considered worthless.

Instead, the number of cylinders is computed as BLKGETSIZE/(H*S).
(Thus, there is no need for a new ioctl HDIO_GETBIGGEO or so.
I think the code for it should be deleted from the kernel.)

Andries


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

  reply	other threads:[~2000-05-22 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-22 12:06 HDIO_GETGEO vs. BLKGETSIZE David Woodhouse
2000-05-22 14:17 ` Andries Brouwer [this message]
2000-05-22 14:21   ` David Woodhouse
2000-05-22 14:30     ` Andries Brouwer
2000-05-22 15:47       ` David Woodhouse
2000-05-22 16:05         ` Andries Brouwer
2000-05-22 23:14   ` Andre Hedrick

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=20000522161756.A23047@veritas.com \
    --to=aeb@veritas.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=mtd@infradead.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