A
system and method for providing a substantially constant-time copy operation for
file system objects managed by a
network storage server begins by generating a new file based on
metadata in a source file. The
system then generates a snapshot of the source file or the logical volume in which the source file resides. The
system then copies each of the indirect blocks of the source file to a corresponding location in the destination file. During the copy process, a modified set of
file system operations can be executed on the destination
metadata container. In response to a read request directed to a target block in the destination file, the system determines if target block has been copied. If the block has not been copied, the system provides a
data segment from the corresponding data block in the snapshot. Write requests are processed by generating a new data block and adding a reference to the new data block to the target location in the destination
metadata container. During the copy process, the system checks each block reference before
copying to determine if the block reference has been modified by a write operation. If the block was modified, the system skips
copying that particular block reference. The system provides additional operations to execute truncate and
append operations during the copy process.