# US 6,732,248 B2 · System and method for ghost offset utilization in sequential byte stream semantics

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 6,732,248 B2
- Document ID: US6732248B2
- Status: Granted
- Kind: B2
- Application number: 09/893,426
- Filed: 2001-06-28
- Published: 2003-01-02
- Granted: 2004-05-04
- Earliest claimed: 2001-06-28
- Assignees: International Business Machines Corporation
- Inventors: Joon Chang; Amy Yi-mei Shi
- Web page: https://patentgrep.com/patent/US6732248B2

## CPC

- G06F 16/30: of unstructured textual data (document management systems G06F16/93)
- G06F 16/2246: {Trees, e.g. B+trees}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for releasing storage space at the beginning of a byte stream while maintaining sequential byte stream semantics is provided. A ghost offset is initialized when a file is instantiated or opened. When information is deleted at the beginning of the sequential byte stream, the ghost offset is incremented in the amount of the number of bytes being deleted. The ghost offset continues to increment while the file is opened and information is being deleted at the beginning of the data stream. The virtual offset is the ghost offset added to the real offset of a particular entry in the data stream which maintains sequential byte stream semantics. When the file is closed, storage space is released in the amount of the ghost offset. Applications are provided with virtual offsets corresponding to data locations which are converted to real offsets for accessing data in the data stream.

## Claims

### Claim 1

A method for managing a data stream, said method comprising:
identifying a truncation amount corresponding to the data stream;
incrementing a ghost offset in response to the identification, the ghost offset being a cumulated truncation amount;
determining one or more real offsets corresponding to one or more data areas within the data stream; and
calculating one or more virtual offsets corresponding to the data areas based upon the real offsets and the ghost offset.

### Claim 2 (depends on 1)

The method as described in claim 1 further comprising:
removing the cumulated truncation amount of data from a front of the data stream.

### Claim 3 (depends on 1)

The method as described in claim 1 further comprising:
storing the ghost offset and the real offset in a file system area; and
providing the virtual offset to an application that accesses the data stream managed by the file system.

### Claim 4 (depends on 1)

The method as described in claim 1 further comprising:
repeatedly incrementing the ghost offset in response to multiple truncation requests.

### Claim 5 (depends on 1)

The method as described in claim 1 further comprising:
identifying a plurality of truncation amounts corresponding to the data stream;
assigning a ghost offset to each of the truncation amounts;
determining one or more real offsets corresponding to each of the ghost offsets; and
removing the plurality of truncation amounts from a plurality of areas within the data stream.

### Claim 6 (depends on 1)

The method as described in claim 1 wherein the calculating includes adding the real offset to the ghost offset to determine the virtual offset.

### Claim 7 (depends on 1)

The method as described in claim 1 wherein the identifying includes receiving a truncation request from an application.

### Claim 8

An information handling system comprising:
one or more processors;
a memory accessible by the processors;
one or more nonvolatile storage devices accessible by the processors, the nonvolatile storage devices including one or more files and a data stream associated with each of the files; and
an data stream management tool to manage the data streams, the data stream management tool including:
means for identifying a truncation amount corresponding to the data stream;
means for incrementing a ghost offset in response to the identification, the ghost offset being a cumulated truncation amount;
means for determining one or more real offsets corresponding to one or more data areas within the data stream; and
means for calculating one or more virtual offsets corresponding to the data areas based upon the real offsets and the ghost offset.

### Claim 9 (depends on 8)

The information handling system as described in claim 8 further comprising:
means for removing the cumulated truncation amount of data from a front of the data stream.

### Claim 10 (depends on 8)

The information handling system as described in claim 8 further comprising:
means for storing the ghost offset and the real offset in a file system area; and
means for providing the virtual offset to an application that accesses the data stream managed by the file system.

### Claim 11 (depends on 8)

The information handling system as described in claim 8 further comprising:
means for repeatedly incrementing the ghost offset in response to multiple truncation requests.

### Claim 12 (depends on 8)

The information handling system as described in claim 8 further comprising:
means for identifying a plurality of truncation amounts corresponding to the data stream;
means for assigning a ghost offset to each of the truncation amounts;
means for determining one or more real offsets corresponding to each of the ghost offsets; and
means for removing the plurality of truncation amounts from a plurality of areas within the data stream.

### Claim 13 (depends on 8)

The information handling system as described in claim 8 wherein the means for calculating includes means for adding the real offset to the ghost offset to determine the virtual offset.

### Claim 14

A computer program product stored in a computer operable media for managing a data stream, said computer program product comprising:
means for identifying a truncation amount corresponding to the data stream;
means for incrementing a ghost offset in response to the identification, the ghost offset being a cumulated truncation amount;
means for determining one or more real offsets corresponding to one or more data areas within the data stream; and
means for calculating one or more virtual offsets corresponding to the data areas based upon the real offsets and the ghost offset.

### Claim 15 (depends on 14)

The information handling system as described in claim 14 further comprising:
means for removing the cumulated truncation amount of data from a front of the data stream.

### Claim 16 (depends on 14)

The information handling system as described in claim 14 further comprising:
means for storing the ghost offset and the real offset in a file system area; and
means for providing the virtual offset to an application that accesses the data stream managed by the file system.

### Claim 17 (depends on 14)

The information handling system as described in claim 14 further comprising:
means for repeatedly incrementing the ghost offset in response to multiple truncation requests.

### Claim 18 (depends on 14)

The information handling system as described in claim 14 further comprising:
means for identifying a plurality of truncation amounts corresponding to the data stream;
means for assigning a ghost offset to each of the truncation amounts;
means for determining one or more real offsets corresponding to each of the ghost offsets; and
means for removing the plurality of truncation amounts from a plurality of areas within the data stream.

### Claim 19 (depends on 14)

The information handling system as described in claim 14 wherein the means for calculating includes means for adding the real offset to the ghost offset to determine the virtual offset.

### Claim 20 (depends on 14)

The information handling system as described in claim 14 wherein the means for identifying includes means for receiving a truncation request from an application.
