Computing systems generally utilize non-volatile storage media, such as hard disk drives, to store information, and to ensure the availability of stored information across power cycles. In some instances, computing systems or applications executed by computing systems require that data be committed to a disk drive in a specific order, such that subsequent read requests to the disk drive result in retrieval of the expected data.
However, the systems and protocols used to interact with storage devices such as disk drives may be unable to ensure such a specific order of writes. For example, multithreaded systems may allow multiple applications or processes to access a disk drive simultaneously or near-simultaneously, and in doing so, may reorder various operations performed by the applications or processes. Further, current disk drives or other non-volatile storage media can utilize volatile cache memory in an attempt to increase speed and efficiency of the drive. Use of cache memory, and protocols associated therewith, may result in reordering of operations prior to commitment to a non-volatile memory. Reordering of operations to the non-volatile memory may result in unexpected values being written to or read from the non-volatile memory by the computing system, and therefore result in errors.
To compensate for the out-of-order environment in which writes can be committed to the non-volatile memory, an application has the option to ensure that all of its previous writes have completed before completion of the next write by performing an application file operation flush, which causes all data of all previously completed writes to be forced out of the system and committed to the storage device's permanent media. However, implementation of a flush command on the storage device is generally time consuming, and can degrade performance. Consequently, many storage subsystems (or software/firmware/hardware associated therewith) decline to perform flush commands. Ignoring a program's (e.g., application's or operating system's) flush commands may increase performance relative to performing the commands, but results in potential data inconsistency.
An alternative technique for ensuring data consistency is to serialize all ordered writes throughout the host computing device and mark each one as a Forced Unit Access (FUA). Use of FUA writes ensures that each write is committed to non-volatile media before the command is completed. However, due to the delay in completion, FUA commands tend to be significantly slower than a typical write command. As a result, many storage subsystems (or software/firmware/hardware thereof) fail to respect a program's request to perform FUA writes.