linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Noll <maan@systemlinux.org>
To: Wei Yongquan <weiyqlq@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: linear : divide error: 0000
Date: Mon, 3 Nov 2008 17:43:10 +0100	[thread overview]
Message-ID: <20081103164310.GL17966@skl-net.de> (raw)
In-Reply-To: <1346d4690811030653s566d17a7mc6c31fadb0f533d1@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

On 22:53, Wei Yongquan wrote:
> >> the code linear.c :
> >>
> >> 158              min_spacing = conf->array_sectors / 2;
> >> 159              sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *));
> >>
> >> if the array size is less then 1024K and the system is 32 based,
> >> min_spacing will be ZERO.
> >
> > nope, array_sectors in in 512 byte units. So the array size has to

s/in in/ is in

> > be smaller than 1024 _bytes_ for min_spacing to become zero.
> Thanks.
> er,  "array_sectors in in 512 byte units" means  when array_sectors =
> 2048, the array size is actually 2048 * 512 = 1024K. Is that right?

Exactly.

> when min_spacing < 1024 at line 158, it becomes zero at line 159. is that right?

Yes, that's true, provided that PAGE_SIZE is 4096 and sizeof(struct
dev_info *) is 4.

Andre
-- 
The only person who always got his work done by Friday was Robinson Crusoe

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-11-03 16:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02 16:03 linear : divide error: 0000 Wei Yongquan
2008-11-03 10:32 ` Andre Noll
2008-11-03 12:37   ` Wei Yongquan
2008-11-03 14:15     ` Andre Noll
2008-11-03 14:53       ` Wei Yongquan
2008-11-03 16:43         ` Andre Noll [this message]
2008-11-03 18:28   ` Andre Noll
2008-11-06  6:44     ` Neil Brown

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=20081103164310.GL17966@skl-net.de \
    --to=maan@systemlinux.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=weiyqlq@gmail.com \
    /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).