×

Method and apparatus for compressing data in a file system

  • US 7,496,586 B1
  • Filed: 05/26/2004
  • Issued: 02/24/2009
  • Est. Priority Date: 05/26/2004
  • Status: Active Grant
First Claim
Patent Images

1. A method for storing a file comprising:

  • receiving a request to store the file in a storage pool,obtaining and compressing a first portion of the file to obtain a first compressed data block;

    obtaining and compressing a second portion of the file to a second compressed data block;

    generating a first compressing header for the first compressed data block;

    generating a second compression header for the second compressed data block;

    combining the first compressed data block and the first compression header to obtain a first compressed data block package;

    storing the first compressed data block package in a storage pool at a first location;

    combining the second compressed data block and the second compression header to obtain a second compressed data block package;

    storing the second compressed data block package in the storage pool at a second location;

    calculating a first checksum for the first compressed data block;

    calculating a second checksum for the second compressed data block; and

    building a first indirect block comprising the first location, the first checksum, the second location, and the second checksum, a first set compression flag indicating that the first location comprises the first compressed data block, and a second set compression flag indicating that the second location comprises the second compressed data block;

    storing the first indirect block in the storage pool at a third location;

    building a second indirect block comprising the third location and a first non-set compression flag indicating that the third location includes an uncompressed first indirect block; and

    storing the second indirect block in the storage pool at a fourth location,wherein the first location, second location, third location, and fourth location are separate physical locations in the storage pool,wherein the first indirect block and the second indirect block are used to obtain the first compressed data block and the second compressed data block during a read operation.

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