Patent attributes
A method and storage device are disclosed for card-based management of discardable files, where discardable files are tracked in a discardable file system on a storage device and are invisible to a host file system, which only tracks user files and free space. The method includes the storage device detecting currently free logical clusters corresponding to at least a portion of free space in the storage area and determining whether addresses associated with a subsequent user file write request are in a range of free clusters managed in the discardable file system by the storage device. When addresses in a host write request overlap the addresses of space managed by the discardable file system, the storage device discards discardable files as necessary and removes the newly freed clusters from the discardable file system, such that the discardable file system data structure is resized when room for user files is needed.