File Data Modification via Pointer Adjustment
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing methods for modifying data within a file system are resource-intensive and time-consuming, especially when dealing with large files, as they often require copying and moving large portions of data, leading to inefficiencies in inserting or deleting data.
Innovation Solution
The method involves determining the location of data to be modified within a file, writing new data into a new data block, and adjusting pointers to point to the new data block, while identifying and managing incomplete blocks by negating their pointer values, thereby avoiding the need to copy or move extensive file data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If data is copied into a temporary file and then moved, then the file modification is completed, but large amounts of time and resources are wasted
Solution Approach 1:
The patent extracts only the necessary pointer information from the file system structure rather than copying the entire file data. By manipulating pointers directly in the inode structure, the system achieves file modification without the time-consuming process of copying data to temporary files and back, thus resolving the contradiction between modification reliability and time consumption.
Solution Approach 2:
The patent introduces pointers as an intermediary mechanism between the file system and actual data blocks. Instead of directly copying file data, the system uses pointer manipulation in the inode structure as a mediator to redirect file access to new data locations, significantly reducing the time and resources required for file modification while maintaining data integrity.
2Reliability
If data is copied into a temporary file, then the file modification is completed, but additional data storage resources are required
Solution Approach 1:
The patent extracts only the essential pointer information from the file system structure rather than copying the entire file data. By manipulating pointers directly in the inode structure, the system achieves file modification without requiring additional storage resources for temporary files, thus resolving the contradiction between modification reliability and storage resource consumption.
3Reliability
If two buffers are used to recursively shift data, then the file modification is completed, but large amounts of time and resources are wasted
Solution Approach 1:
The patent extracts only the necessary pointer information from the file system structure rather than copying the entire file data. By manipulating pointers directly in the inode structure, the system achieves file modification without the productivity-lossing process of using two buffers to recursively shift data, thus resolving the contradiction between modification reliability and modification efficiency.
Solution Approach 2:
The patent introduces pointers as an intermediary mechanism between the file system and actual data blocks. Instead of using two buffers to recursively shift data, the system uses pointer manipulation in the inode structure as a mediator to redirect file access to new data locations, significantly improving modification efficiency while maintaining data integrity.
Data Source
AI summary
Disclosed herein are methods, systems, and computer program products for managing data within a file system. In embodiments, the method includes determining the location of data within a file to be modified, modifying the data within the file, and adjusting a pointer to point to the data block containing the modified data. The data within a file may be modified by deleting data from the file or inserting new data into the file. New data may be inserted into a file by writing the data into new data blocks and then adjusting the pointers to point to the location of the new data blocks. An example method may also include determining whether data blocks are incomplete blocks and identifying the incomplete blocks by negating the value of the pointers to those blocks.


