Patent ID: 8140813

Claim:
A method of autonomous operation of a storage device controller, comprising: upon detecting a triggering event, a controller of a storage device enumerating a list of files that are candidates for deletion from storage media of the storage device, said storage media communicatively coupled to the controller, and recording a list of sectors of the storage media used to store the candidate files; marking storage device file system directory entries for the list of enumerated files as deleted while locking out a host device for the storage device from accessing the storage media, and performing a read/modify/write sequence of those sectors of the storage media holding the directory entries; waiting for a first host device synchronization event; upon recognizing the first host device synchronization event, checking the list of candidate files for deletion and determining whether corresponding directory entries of the candidate files are marked deleted; if the directory entries of the candidate files are not marked deleted, repeating the marking of directory entries as deleted, performing the read/modify/write of the sectors of the storage media holding the directory entries, and waiting for an additional first host device synchronization event; otherwise, if the directory entries of the candidate files are marked deleted, then marking orphaned sectors to prevent data storage to corresponding data storage units in the storage media but maintaining the orphaned sectors in the list of sectors, wherein the orphaned sectors are those sectors with corresponding directory entries that are marked as deleted but with corresponding data storage units in the storage media still allocated; waiting for a further host device synchronization event and, upon recognition of same, iterating through the orphaned sectors to determine whether or not the host device subsequently wrote over the read/modify/write actions; and if the orphaned sectors have reverted to a previous value, then repeating the marking of the orphaned sectors, waiting for the further host device synchronization event and determining whether or not the host device subsequently wrote over the read/modify/write actions, otherwise, if the orphaned sectors are still marked, allocating the list of sectors as being available to store new data and clearing the list of candidate files.