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:13:58 +0000 (18:13 +0100)
commit5126288c8cb02f6584243cc34bab3b62a3eae20a
tree7492b5248736133b819b350a6f6cd9d72668cf12
parent8a1758e3ab8df8543091f99b37bea02411ee9ed9
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