SSD Atomic Update Holding File for SPI Flash
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional approaches to safeguarding updates in solid state drives (SSDs) with SPI flash auxiliary memory are inadequate due to limited computational resources and coarse-grained erase-write characteristics, making them vulnerable to power failures or other failure events.
Innovation Solution
The SSD employs an atomic update file system that writes updates to a holding file in the auxiliary memory, applies the update to the target file only when all writes are successful, and resets the holding file if not all writes are completed, using a journal to record successful writes and reallocating memory after updates, ensuring data integrity and recovery in case of failures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional update safeguard approaches are used in SSDs with SPI flash auxiliary memory, then computational resource requirements are reduced, but reliability during power failure or other failure events deteriorates
Solution Approach 1:
The update process is segmented into distinct phases: allocation phase (reserving space in holding file), write phase (writing update data to holding file), and commit phase (applying holding file to target file). This segmentation allows for atomic updates where each phase can be independently managed and rolled back if necessary, improving reliability without requiring complex external safeguard mechanisms.
Solution Approach 2:
The system performs preliminary actions by allocating and preparing the holding file before the actual update occurs. Space is reserved and the holding file is prepared in advance, so that when an update is needed, the system can immediately write to the prepared structure. This preliminary preparation ensures that updates can be atomic and reversible, enhancing reliability while keeping the system simple.
2Reliability
If coarse-grained erase-write characteristics of SPI flash are used, then device simplicity is maintained, but vulnerability to power failure increases
Solution Approach 1:
The holding file serves as an intermediary structure between the update source and the target file in SPI flash memory. All update writes first go to the holding file, which acts as a buffer or staging area. Only after successful writes to the holding file are the changes applied to the target file. This intermediary approach protects against power failures during the critical write process while working within the coarse-grained erase-write constraints of SPI flash.
Solution Approach 2:
The system changes the operational parameters of the update process by introducing a two-stage write mechanism. Instead of directly writing to the target file, updates are first written to the holding file with specific parameters (allocation status, write completion status). This parameter-based control allows the system to track update progress and ensure atomicity, improving power failure protection while maintaining ease of operation.
3Reliability
If updates are applied incrementally to target files, then productivity is improved, but data integrity during partial updates deteriorates
Solution Approach 1:
The system performs preliminary writes to the holding file before applying changes to the target file. All incremental updates are first accumulated in the holding file, maintaining data integrity throughout the process. Only after the holding file is fully prepared are the changes atomically applied to the target file. This preliminary action ensures that even though updates are incremental, the final application is atomic and maintains complete data integrity.
Solution Approach 2:
The holding file acts as an intermediary that decouples the incremental update process from the target file modification. Incremental writes can proceed efficiently to the holding file without immediately affecting the target file. The intermediary holding file ensures that only complete, validated updates are applied to the target, maintaining data integrity while allowing productive incremental processing.
Data Source
AI summary
A method of updating a file in a solid state drive (SSD) and an SSD configured to update a file in the SSD is disclosed. In one embodiment, the method includes performing one or more writes to a holding file in an auxiliary memory, the one or more writes corresponding to an update for a target file in the auxiliary memory. The method further includes applying the update to the target file in the auxiliary memory when each of the one or more writes has been successfully written to the holding file, and resetting the holding file when less than all of the one or more writes have been successfully written to the holding file. In one embodiment, a flash controller in communication with the auxiliary memory performs the update.


