Patent ID: 8615500

Claim:
A method of operating a file server, the file server having data storage storing a file system, a data processor coupled to the data storage for access to files in the file system, and non-transitory computer readable storage medium coupled to the data processor and storing computer instructions, and the computer instructions, when executed by the data processor, perform a method of writing a new block of data to a first file in the file system by the steps of: (a) compressing the new block of data to produce compressed data for the first file; (b) finding a file system data block containing compressed data of a second file in the file system and having sufficient free space for storage of the compressed data for the first file; (c) writing the compressed data for the first file to the free space of the file system data block; and (d) linking the compressed data for the first file to the first file; wherein step (d) includes allocating storage for virtual block metadata about the compressed data for the first file, setting a pointer the file system data block in the virtual block metadata, and setting a pointer to the storage for the virtual block metadata in file mapping metadata of the first file; and further includes incrementing a reference count for the file system data block, and setting a reference count in the virtual block metadata.