archive mirror
 help / color / mirror / Atom feed
From: David Zaffiro <>
Subject: Re: [PATCH] pdcraid and weird IDE geometry
Date: Thu, 17 Jul 2003 14:19:03 +0200	[thread overview]
Message-ID: <3F169437.8000802@_netscape_._net_> (raw)
In-Reply-To: <>

I don't think this has any to do with the calculation, you probably just have to use:


(well, combined with...


...and a lot of other options...)

With 2.4.20 the FORCE option had to be set at "n", now it should be set at "y".

> The calc_pdcblock_offset function calculates lba by taking the capacity
> of the drive and dividing it by (head * sector), multiplying the result
> times (head * sector) and subtracting the sector (SPT) count.
> Unfortunately, with the strange geometry reported by the new drive,
> using INTs to store these values will fail. 

Avoiding floating-point precision,  this would do the same as your calculation:

lba = ideinfo->capacity - ideinfo->sect;

However, I don't think the expression "fails". the way it is expressed now, it will divide something integer-wise and then multiply it with the same value (and then minus sect), thus I assume this was intended: To round the capacity value to the next multiple of (head * start),  and then do a minus sect...

I don't think any hardcore programmer ever does a integerwise divide /before/ an integerwise multiply without a very good reason... (And don't give me that "you'd be surprised"!!!)

  parent reply	other threads:[~2003-07-17 12:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-17  2:26 Walt H
2003-07-17  8:49 ` Arjan van de Ven
2003-07-17 14:37   ` Walt H
2003-07-17 14:58     ` Alan Cox
2003-07-17 15:34       ` Jeff Garzik
2003-07-17 16:03         ` Andries Brouwer
2003-07-17 15:34       ` Andries Brouwer
2003-07-18  2:33         ` Walt H
2003-07-18  8:58           ` Andries Brouwer
2003-07-18 13:56             ` Walt H
2003-07-17 12:19 ` David Zaffiro [this message]
2003-07-18 14:51 Walt H

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:

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

  git send-email \
    --in-reply-to=3F169437.8000802@_netscape_._net_ \ \ \ \
    --subject='Re: [PATCH] pdcraid and weird IDE geometry' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).