×

METHOD AND APPARATUS TO PERFORM INCREMENTAL TRUNCATES IN A FILE SYSTEM

  • US 20090182792A1
  • Filed: 01/14/2008
  • Published: 07/16/2009
  • Est. Priority Date: 01/14/2008
  • Status: Active Grant
First Claim
Patent Images

1. A computer implemented method for truncating a file in a file system, the method comprising:

  • receiving a request to truncate the file to a target size, the file having a primary inode;

    creating a transient directory inode, wherein the transient directory inode holds a plurality of in-progress entries;

    setting a target size in the primary inode;

    writing a truncate entry to a journal, the truncate entry comprising a predetermined size;

    truncating the file by up to the predetermined size;

    determining that the file is above the target size;

    responsive to a determination that the file is above the target size, repeating the truncating step and the determining step; and

    responsive to a determination that the file is not above the target size, apply the in-progress entries from the transient directory inode.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×