Thread (7 messages) 7 messages, 2 authors, 2008-11-03

Re: linear : divide error: 0000

flat view

From: Andre Noll <hidden>
Date: 2008-11-03 16:43:10

On 22:53, Wei Yongquan wrote:
quoted
quoted
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
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help