kernel/nataraid: Fix a bug for array sizes >2TB.
authorSascha Wildner <saw@online.de>
Sun, 16 Feb 2014 22:51:16 +0000 (23:51 +0100)
committerSascha Wildner <saw@online.de>
Mon, 17 Feb 2014 17:11:31 +0000 (18:11 +0100)
commitfeabea0f74a8f331b47ca132bf32f2c82e8a283a
treeb05dedcfc45aa955f684d00f444ab241bcef7ed6
parent89be26e14c2b94e607e882671327a4af9f46a5d7
kernel/nataraid: Fix a bug for array sizes >2TB.

The overall array size (total_sectors) in the softc was already 64 bit
wide but due to a missing cast when multiplying the 32 bit disk size
by the number of disks, it never became larger than 32 bits.

Also, the disk size was signed when it should have been unsigned.

Note that these fixes apply to RAIDs created using natacontrol(8), but
not necessarily to those created with BIOS utilities.

Reported-by: Aaron Bieber <deftly@gmail.com>
sys/dev/disk/nata/ata-raid.c