Patent attributes
A RAID controller is disclosed. The controller controls at least one redundant array of physical disks, receives I/O requests for the array from host computers, and responsively generates disk commands for each of the disks. Some commands specify host computer user data, and others specify internally generated redundancy data. The controller executes coalescer code that maintains the commands on a queue for each disk. Whenever a disk completes a command, the coalescer determines whether there are two or more commands on the disk's queue that have the same read/write type and specify adjacent locations on the disk, and if so, coalesces them into a single command, and issues the coalesced command to the disk. The coalescer immediately issues a received command, rather than queuing it, if the number of pending commands to the disk is less than a maximum command depth, which may be different for each disk.