Patent ID: 7567995

Claim:
A method of defragmenting file fragments in a file system comprising the steps of: determining an initial defragmentation sequence for re-ordering the file fragments in the file system; determining if at least one fragment in the file system is moved more than once in the initial defragmentation sequence; removing the at least one fragment from the file system if the at least one fragment is moved more than once in the initial defragmentation sequence; determining a subsequent defragmentation sequence without considering the at least one removed file fragment; determining if the subsequent defragmentation sequence contains a subsequent at least one fragment that is moved more than once in the subsequent defragmentation sequence; removing the subsequent at least one fragment from the file system and further determining the defragmentation sequence without considering the removed subsequent at least one fragment; obtaining the subsequent determined defragmentation sequence including modifying the initial defragmentation sequence whereby references to the removed fragments are removed; rearranging the remaining file fragments on the file system according to the subsequent determined defragmentation sequence; and replacing the removed file fragments in the file system after the subsequent defragmentation sequence.