Re: linear : divide error: 0000

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: Digital signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux