Log writing and synchronization method and device, system and computer storage medium
A technology for synchronizing device and writing position, applied in the direction of calculation, input/output to record carrier, and input/output process of data processing, etc., can solve the problem of log disk partition saturation, the impact of solid-state disk performance and life, and the inability to balance log disks Partition storage space and other issues
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0139] The processing steps of the log writing process part are as follows:
[0140] Step 1: Read CP, LP. The initial value is 0.
[0141] Step 2: Write the log page data into the log data page numbered LP.
[0142] Step 3: Obtain the metadata of the write operation from the file system, including layout, ino, etc. Store layout and ino in the log bitmap area, and the slot number is LP.
[0143] Step 4: LP++.
[0144] Step 5: Determine whether LP is equal to MP, if so, assign LP to SP.
[0145] Step 6: Determine whether LP+5 is equal to CP, and if so, trigger log synchronization.
[0146] The processing steps of the log synchronization process part are as follows:
[0147] Step 1: Read CP, LP.
[0148] Step 2: Check if CP and LP are equal, if they are equal, end. If CP is smaller than LP, go to step 3. If CP is greater than LP, go to step 7.
[0149] Step 3: Read the log bitmap area, and traverse the metadata layout of slot numbers from CP to LP for duplication. If t...
Embodiment 2
[0159] The processing steps of the log writing process part are as follows:
[0160] Step 1: Read CP, LP.
[0161] Step 2: Get the metadata of the write operation from the file system, including layout, BlockID, etc. Store the layout and BlockID in the log bitmap area, and the slot number is LP.
[0162] Step 3: Write the log page data into the log data page numbered LP.
[0163] Step 4: LP++.
[0164] Step 5: Determine whether LP is equal to MP, if so, assign LP to SP.
[0165] Step 6: Determine whether LP+1 is equal to CP, and if so, trigger log synchronization.
[0166] The processing steps of the log synchronization process part are as follows:
[0167] Step 1: Read CP, LP.
[0168] Step 2: Check if CP and LP are equal, if they are equal, end. If CP is smaller than LP, go to step 3. If CP is greater than LP, go to step 6.
[0169] Step 3: Read the log bitmap area, traverse the metadata of slot numbers from CP to LP, and write the content of the corresponding log p...
Embodiment 3
[0177] The application scenario of this embodiment is an Internet small picture storage service, and pictures smaller than 1 KB are defined as small pictures. Therefore, a single page must be able to aggregate and store 4 small pictures. In the bitmap area, an array named gather is added to each slot, the length of the array is 4, and the elements of the array are used to store oids. Among them, the first element is used to store the oid of the small picture stored in the first 1KB of the page, the second element is used to store the oid of the small picture stored in the second 1KB of the page, and so on. When the array element is 0, it means that the 1KB position in the page is vacant.
[0178] The processing steps of the log writing process part are as follows:
[0179] Step 1: Determine whether the file size is less than 1KB, if not, write directly to the disk without writing the log.
[0180] Step 2: Read CP, LP. The initial value is 0.
[0181]Step 3: Read the layou...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com