File Truncation via Snapshot Copy and Asynchronous Block Deallocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional file systems face challenges in efficiently truncating files, leading to high CPU and I/O resource consumption, long processing times, and potential data inconsistencies due to synchronous locking and extensive metadata updates during delete or truncate operations.

Innovation Solution

The method involves creating an internal snapshot copy of a file, sharing file system blocks between the file and the snapshot, updating metadata to indicate block ownership, and asynchronously deallocating blocks in the background, thereby reducing the number of I/O operations and metadata transactions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronous locking and extensive metadata updates are performed during delete or truncate operations, then data consistency is maintained, but CPU and I/O resource consumption increases significantly

Engineering Contradiction:
Improvedata consistencyVSAvoidCPU and I/O resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system performs preliminary actions by creating a snapshot of the file system before deletion operations and pre-allocating metadata structures. This allows the actual delete/truncate operations to proceed without extensive metadata updates, reducing CPU and I/O consumption while maintaining consistency through the snapshot mechanism.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism (snapshot/replica) that mediates between the delete operation and the actual data structures. Instead of directly updating extensive metadata during deletion, the system uses the snapshot as an intermediary to track changes, significantly reducing resource consumption while preserving data consistency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If synchronous locking is used during file truncate operations, then locking semantics are maintained, but processing time increases

Engineering Contradiction:
Improvelocking semanticsVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts the locking mechanism from the critical path of truncate operations. By maintaining locking semantics through metadata updates outside the synchronous operation flow and using snapshots to track state changes, the system preserves correctness while dramatically reducing processing time for truncate operations.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If extensive metadata updates are performed during file deletion, then correct locking semantics are maintained, but the number of I/O operations increases

Engineering Contradiction:
Improvelocking semanticsVSAvoidnumber of I/O operations
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary metadata preparation and snapshot creation before deletion operations. This preliminary action allows the actual deletion to proceed with minimal metadata updates and fewer I/O operations, while still maintaining correct locking semantics through the established snapshot mechanism.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating snapshots/replicas of the file system state before deletion. Instead of updating extensive metadata during deletion, the system copies the necessary state information into the snapshot and uses reference counting, significantly reducing the number of I/O operations required while preserving locking semantics.

Inventive Principle:
Principle #26Copying

4Quantity of substance

If file blocks are deallocated synchronously during truncate operations, then storage space is reclaimed immediately, but resource consumption and processing time increase

Engineering Contradiction:
Improvestorage space reclamationVSAvoidresource consumption and processing time
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent extracts the block deallocation process from the synchronous truncate operation. By using snapshot-based tracking and reference counting, the system allows truncate operations to complete quickly while block deallocation proceeds asynchronously in the background, reducing resource consumption and processing time while still reclaiming storage space effectively.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10242011B1Managing truncation of files of file systems
Publication Date: 2019.03.26 EMC IP HLDG CO LLC
  • US10242011B1 patent drawing
  • US10242011B1 patent drawing
  • US10242011B1 patent drawing

AI summary

A method is used in managing truncation of files of file systems. A request is received to delete a portion of a file of a file system. A replica of the file is created. The replica represents a state of the file at a particular prior point in time. The replica shares a set of file system blocks of the file with the file. The portion of the file is deleted by updating metadata of the file. The replica of the file is asynchronously deleted in background by de-allocating the set of file system blocks.