Patent ID: 6931501

Claim:
A method for merging like commands for transfers between a storage medium and memory, comprising: accumulating a plurality of commands in a queue while a first command is being processed by the storage medium, each of the plurality of commands including a first command data block (CDB) and a first scatter gather list (SGL), the first CDB configured to identify a location of a file on the storage medium, the first SGL configured to include data pointers identifying a location of data in the memory, the plurality of commands in the queue including contiguous commands and non-contiguous commands; examining the plurality of commands in the queue while the first command is being processed, the examining further including: checking if any of the plurality of commands are like commands through analysis of the first CDB, each of the like commands corresponding to a file stored on a storage medium; and determining if any of the files on the storage medium are stored contiguously with respect to one another through analysis of the first CDB; combining the like commands corresponding to contiguous files as a combined command, wherein the combined command having a second CDB and a second SGL derived from the first CDB and the first SGL; and issuing the combined command to the storage medium upon completion of the processing of the first command.