Invention Grant
US07805471B2 Method and apparatus to perform incremental truncates in a file system 有权
在文件系统中执行增量截断的方法和装置

Method and apparatus to perform incremental truncates in a file system
Abstract:
The present invention provides a computer implemented method for truncating a file in a file system. The file system receives a request to truncate a file to a target size, the file having a first inode. The file system creates a second inode to a transient directory, wherein the second inode holds a plurality of in-progress entries. The file system sets a target size in the first inode. The file system writes a truncate entry to a journal, the truncate entry comprising a predetermined size. The file system truncates the file by up to the predetermined size. The file system determines that the file is above the target size. Responsive to a determination that the file is above the target size, the file system repeats the truncating step and the determining step. Responsive to a determination that the file is not above the target size, the file system applies the in-progress entries from the transient directory.
Information query
Patent Agency Ranking
0/0