Patent attributes
Method and apparatus for managing data in a storage device, such as a solid-state drive (SSD). An apparatus includes a main non-volatile memory (NVM) such as a NAND flash memory. A host command queue lists pending data transfer commands to transfer data between the NVM and a host. For each write command received by the NVM to store write data to an associated target location, a controller examines the host command queue. Based on this review, the controller may direct the NVM to read data adjacent the associated target location to which data are to be written by the write command and to transfer the read data to a read cache. The read data may use some or all of the same resources used to store the write data to the NVM. The read data may be subsequently transferred from the read cache to the host.