File System 2-Level Synchronization for Write Unmap Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Storage devices that support both write and unmap IOs may experience data inconsistencies due to the lack of synchronization, leading to scenarios where data is written to unmapped blocks or blocks are unmapped while being written to.

Innovation Solution

A method for synchronously executing IOs involves receiving a write IO, determining if there are any pending unmap IOs within a specific range, locking the range to prevent unmap IOs, writing the data, and then unlocking the range to allow unmap IOs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the storage device does not synchronize the execution of write and unmap IOs, then the processing speed and responsiveness are improved, but data consistency and reliability deteriorate

Engineering Contradiction:
ImproveIO processing speedVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by checking for pending unmap IOs before executing a write IO. The storage device determines whether any unmap IOs are pending for the target data block before proceeding with the write operation. If unmap IOs are pending, the write IO is delayed until they complete, preventing data inconsistency without requiring continuous synchronization overhead.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism in the form of a synchronization check or flag system that mediates between write and unmap IOs. This intermediary structure tracks the status of unmap operations and controls whether write operations can proceed, acting as a buffer that prevents direct conflicts while maintaining high throughput for non-conflicting operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If the storage device synchronizes the execution of write and unmap IOs using traditional methods, then data consistency is improved, but the system complexity and processing overhead increase

Engineering Contradiction:
Improvedata consistencyVSAvoidsynchronization mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent reduces complexity by performing the synchronization check preliminarily and selectively - only when a write IO is received and unmap IOs might be pending. This avoids continuous or blanket synchronization mechanisms that would increase system complexity, while still ensuring data consistency when needed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The storage device's IO processing logic inherently includes the synchronization check as part of its natural workflow when receiving write IOs. The system serves its own synchronization needs by integrating the check into the existing IO handling path rather than requiring separate complex synchronization protocols or external coordination mechanisms.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12222904B2Avoiding data inconsistency in a file system using 2-level synchronization
Publication Date: 2025.02.11 VMWARE INC
  • US12222904B2 patent drawing
  • US12222904B2 patent drawing
  • US12222904B2 patent drawing

AI summary

A method of synchronously executing input/output operations (IOs) for a plurality of applications using a storage device with a file system includes the steps of: receiving a first write IO including an instruction to write first data at a first address of the file system; determining that, within a first range of the file system comprising the first address, there are no pending unmap IOs for deallocating storage space of the storage device from files of the plurality of applications; after determining that there are no pending unmap IOs within the first range, locking the first range to prevent incoming unmap IOs from deallocating storage space within the first range from the files of the plurality of applications; after locking the first range, writing the first data to the storage device at the first address; and after writing the first data, unlocking the first range.