1. A method of operating a data storage device comprising: placing commands received from a host in a queue; for a write command designated as write-barrier-insensitive by having a barrier sensitivity bit set by a host to designate the write command as being write-barrier-insensitive, optimizing an order of execution of the write command designated as write-barrier-insensitive without regard for write barrier commands issued by the host; and for a write command designated as write-barrier-sensitive by having a barrier sensitivity bit set by the host to designate the write command as being write-barrier-sensitive, writing data to the media only after writing data for previously received write barrier commands.