Patent ID: 8463802

Claim:
A method for managing files with a storage device, the method comprising: in a storage device operatively coupled to a host, the storage device having a storage area comprising user files, free space and discardable files, the storage device: identifying a record of free clusters in a discardable file system data structure, wherein the discardable file system data structure is separate from a host file system data structure stored on the storage device; receiving a request from the host to store a user file in the storage area; determining whether logical block addresses (LBAs) associated with data in the request are in a range of logical block addresses associated with clusters in the record in the discardable file system data structure; and when the LBAs are in the range and there is free space available in the range: mapping the LBAs of the user file to free clusters identified in the discardable file system data structure; and subsequently removing the clusters mapped to the LBAs of the user file from the discardable file system data structure.