Atomic write function test method, device and equipment for SSD (Solid State Disk) based on IO (Input / Output) process interruption scene and medium

By implementing the atom writing function test method based on the IO process, the problem of the lack of abnormal scenes in the existing technologies has been solved, and effective verification and performance assessment of the SSD atomic writing function are realized.

CN119377022APending Publication Date: 2025-01-28成都芯忆联信息技术有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411424084.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art lacks the atomic writing function testing capability in abnormal scenarios where the IO write down process is terminated, and it is difficult to test the atomic failure scenario, resulting in the inability to effectively evaluate the data consistency benefits of the atomic writing function.

Method used

Provide an atom writing function test method based on the IO process of interrupting the scene. By obtaining the SSD plate parameter configuration of the atomic writing size, generating embedded files and testing files, writing into the embedded area, and executing IO writing abnormal interruption. MD5 calculation and analysis of the verification files ensure the integrity and consistency of the data.

Benefits of technology

Effectively verify the atom writing function of the SSD during the interruption of IO to ensure that the data is still consistent after the interruption, and the failure scene is triggered when the atomic writing function is turned off. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377022A_ABST
    Figure CN119377022A_ABST
Patent Text Reader

Abstract

The invention relates to an atomic write function test method, device and equipment of an SSD (Solid State Disk) based on an IO (Input / Output) process interruption scene and a medium, the method comprises the following steps: acquiring and configuring an SSD parameter to obtain configuration information; generating a pre-embedded file and a test file according to the configuration information; writing the pre-embedded file into the SSD to obtain a pre-embedded area; performing overwriting on the pre-embedded area by using the test file, and executing I O writing exception interruption; reading the overwritten file to obtain a verification file; and analyzing and processing the verification file to obtain an analysis result. According to the method, the atomic writing function of the SSD in the IO interruption process can be effectively verified, the integrity and consistency of data are ensured according to the design of the atomic writing function of the SSD after interruption occurs, and a failure scene can be triggered under the condition that the atomic writing function is closed, so that a tester directly observes the opening and closing difference of the atomic writing function, and the test efficiency is improved. And the performance and the reliability of the SSD can be effectively evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of SSD atomic write function testing, and in particular to a method, device, equipment and medium for testing the atomic write function of an SSD based on an IO process interruption scenario. Background Art

[0002] A database transaction is a series of operations performed by a single logical unit of work, which is either fully executed or not executed at all. It needs to meet atomicity, consistency, isolation, and permanence. In order to meet a series of requirements, many databases use a double write mechanism, resulting in two write operations to the storage. It can also be achieved through the atomic write feature. The database does not need to use the double write mechanism, and can also ensure that the data is completely written to the disk, reducing one data write operation and improving the service life and performance.

[0003] Currently, the existing technology has atomic write testing tools in normal scenarios, but it does not have the testing capability for abnormal scenarios where the IO write issuance process is terminated. In addition, when atomic write is turned off, existing tools are difficult to test atomic failure scenarios, resulting in the inability to compare and observe the data consistency benefits brought by turning on atomic write. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and to provide a method, device, equipment and medium for testing the atomic write function of an SSD based on an IO process interruption scenario.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] In a first aspect, this embodiment provides a method for testing an atomic write function of an SSD based on an IO process interruption scenario, comprising the following steps:

[0007] Get the SSD disk parameters and configure them to get the configuration information;

[0008] Generate pre-embedded files and test files according to configuration information;

[0009] Write the embedded file into the SSD to obtain the embedded area;

[0010] Use the test file to overwrite the embedded area and perform IO write exception interruption;

[0011] Read the overwritten file to obtain the verification file;

[0012] The verification file is analyzed and processed to obtain the analysis result.

[0013] A further technical solution is: in the step of acquiring SSD disk parameters and configuring to obtain configuration information, the SSD atomic write size, ie, the configuration information, is configured according to the SSD disk parameters.

[0014] A further technical solution is: in the step of writing the pre-embedded file into the SSD to obtain the pre-embedded area, the pre-embedded file is sent down to the IO, and the data is written into the SSD, and the write address, i.e., the pre-embedded area, is recorded.

[0015] Its further technical solution is: the test file is used to overwrite the pre-embedded area, and in the IO write exception interruption step, the test file is sent to the pre-embedded area for IO writing to overwrite, and an instruction is sent during the writing process to interrupt the IO process.

[0016] Its further technical solution is: in the step of analyzing and processing the verification file to obtain the analysis result, the MD5 of each segment in the verification file is calculated according to the atomic write configuration size to obtain calculation information, and then the calculation information is analyzed and processed to obtain the analysis result.

[0017] In a second aspect, the present embodiment provides an atomic write function test device for an SSD based on an IO process interruption scenario, comprising: an acquisition configuration unit, a generation unit, a writing unit, an overwriting interruption unit, a reading unit, and an analysis unit;

[0018] The configuration acquisition unit is used to acquire SSD disk parameters and perform configuration to obtain configuration information;

[0019] The generating unit is used to generate the pre-embedded file and the test file according to the configuration information;

[0020] The writing unit is used to write the pre-embedded file into the SSD to obtain the pre-embedded area;

[0021] The overwriting interruption unit is used to overwrite the pre-embedded area with the test file and perform IO write exception interruption;

[0022] The reading unit is used to read the overwritten file to obtain a verification file;

[0023] The analysis unit is used to analyze and process the verification file to obtain an analysis result.

[0024] A further technical solution is as follows: in the configuration acquisition unit, the SSD atomic write size, ie, the configuration information, is configured according to the SSD disk parameters.

[0025] A further technical solution is: in the writing unit, the pre-embedded file is sent to the IO, and the data is written into the SSD, and the writing address, that is, the pre-embedded area, is recorded.

[0026] In a third aspect, this embodiment provides a computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the atomic write function test method of the SSD based on the IO process interruption scenario as described above is implemented.

[0027] In a fourth aspect, this embodiment provides a storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the atomic write function test method of the SSD based on the IO process interruption scenario as described above can be implemented.

[0028] Compared with the prior art, the beneficial effects of the present invention are as follows: the atomic write function of the SSD during the IO interruption process can be effectively verified, and after the interruption occurs, according to the design of the SSD atomic write function, the integrity and consistency of the data can be ensured, and a failure scenario can be triggered when the atomic write function is turned off, so that the tester can directly observe the difference between turning the atomic write function on and off. That is, by using this SSD atomic write function test method based on the IO process interruption scenario, the performance and reliability of the SSD can be effectively evaluated, providing strong support for the research and development, production and application of the SSD.

[0029] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0031] Figure 1 A flow chart of a method for testing the atomic write function of an SSD based on an IO process interruption scenario provided by an embodiment of the present invention;

[0032] Figure 2 A schematic block diagram of an atomic write function test device for an SSD based on an IO process interruption scenario provided by an embodiment of the present invention;

[0033] Figure 3 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0036] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0037] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0038] See also Figure 1 In the specific embodiment shown, the present invention discloses a method for testing the atomic write function of an SSD based on an IO process interruption scenario, comprising the following steps:

[0039] S1, obtain SSD disk parameters and configure them to obtain configuration information;

[0040] In one embodiment, in the step of acquiring SSD disk parameters and configuring to obtain configuration information, the SSD atomic write size, ie, the configuration information, is configured according to the SSD disk parameters.

[0041] Specifically, you can view detailed information about all disks through the disk management option; you can also view detailed parameters of the SSD, including serial number, firmware version, transfer mode, etc., through the hard disk information query software; or use disk performance testing tools such as Crystal DiskMark to evaluate the read and write speed and random I / O performance of the SSD, so as to indirectly understand its internal configuration and performance characteristics. Among them, the atomic write size is usually related to the internal page size or block size of the SSD. When configuring, you need to ensure that the atomic write size does not exceed the internal page size or block size of the SSD to avoid performance degradation. You can also adjust the atomic write size through the SSD firmware settings or related configuration tools.

[0042] S2, generating pre-embedded files and test files according to the configuration information;

[0043] Specifically, according to the capacity of the SSD and the expected test requirements, determine an appropriate pre-embedded file size. The size of the pre-embedded file should be large enough to fully fill a part of the storage space of the SSD, thereby triggering garbage collection and other internal optimization mechanisms; then use the file system command or professional software (such as the dd command, fsut il command, etc.) to create one or more pre-embedded files on the SSD. The contents of these files can be random or in a specific pattern to simulate different writing modes in actual usage scenarios; finally, according to the test requirements, configure the number, location and size of the pre-embedded files to ensure that the pre-embedded files will not interfere with the normal use of the SSD and will not affect the accuracy of the test results. Among them, according to the atomic write size of the SSD and the test requirements, determine a suitable test file size. The size of the test file should be able to cover multiple atomic write operations so that the write performance of the SSD can be accurately evaluated; then use the file system command or professional software (such as the dd command, hdparm command, etc.) to create one or more test files on the SSD. The contents of these files can be random or in a specific pattern to simulate different write modes in actual usage scenarios; finally, according to the test requirements, configure the number, location and size of the test files to ensure that the test files can fully cover the storage space of the SSD and trigger the internal optimization mechanism of the SSD.

[0044] S3, write the embedded file into the SSD to obtain the embedded area;

[0045] In one embodiment, in the step of writing the pre-embedded file into the SSD to obtain the pre-embedded area, the pre-embedded file is sent down as an IO, and the data is written into the SSD, and the write address, ie, the pre-embedded area, is recorded.

[0046] Specifically, an IO (input / output) instruction is sent to the SSD through the operating system or professional software to instruct the SSD to prepare to receive data. The IO instruction usually includes the starting address of the data to be written, the data size, and the data content to be written. That is, the data content of the embedded file is written to the specified address of the SSD through the IO instruction. During the data writing process, the SSD controller will process the data and store it in the flash memory particles. During the writing process, the starting write address and the ending write address of the embedded file are recorded. These addresses define the scope of the embedded area, and the embedded files can be accessed or managed through these addresses later.

[0047] S4, use the test file to overwrite the embedded area and perform IO write exception interruption;

[0048] In one embodiment, in the step of using a test file to overwrite the pre-embedded area and executing the IO write exception interruption step, the test file is sent to the pre-embedded area for IO writing to overwrite, and an instruction is sent to interrupt the IO process during the writing process.

[0049] Specifically, an IO instruction is sent to the SSD through the IO control tool to instruct the SSD to write the data of the test file into the pre-embedded area. The IO instruction should include the starting address of the write data (i.e., the starting address of the pre-embedded area), the data size, and the data content to be written; after receiving the IO instruction, the SSD controller starts to write the data of the test file into the pre-embedded area. During this process, the data will be written in a specified mode or a random mode to simulate the writing scenario in actual use. During the writing process, the IO control tool or script is used to monitor the writing progress and status, which can be achieved by checking indicators such as the writing speed and the amount of data written. In addition, at an appropriate time, an interrupt instruction is sent to the SSD through the IO control tool to interrupt the current writing process. The specific form of the interrupt instruction depends on the IO control tool used and the hardware characteristics of the SSD.

[0050] S5, reading the overwritten file to obtain a verification file;

[0051] Specifically, a read instruction is sent to the SSD through the file system or a read tool, instructing the SSD to read the overwritten file content into the memory. The read instruction should contain the file path, name, and data range to be read (such as the start byte and end byte). After receiving the read instruction, the SSD controller reads the corresponding data from the flash memory particles and transfers it to the memory. During the reading process, operations such as data decoding, verification, and error correction may be involved to ensure the accuracy and integrity of the data. In addition, the read data is saved to a specified location, such as a directory on the hard disk or a buffer in the memory. The saved data will be used as the basis for the verification file for subsequent file verification work.

[0052] S6, analyzing and processing the verification file to obtain an analysis result.

[0053] In one embodiment, in the step of analyzing and processing the verification file to obtain the analysis result, the MD5 of each segment in the verification file is calculated according to the atomic write configuration size to obtain calculation information, and then the calculation information is analyzed and processed to obtain the analysis result.

[0054] Specifically, according to the atomic write configuration size, the checksum file is divided into multiple segments, and the size of each segment should be equal to or less than the atomic write configuration size. This segmentation process can be implemented through programming or scripting to ensure that each segment can be processed separately. For each segmented segment, the MD5 algorithm is used to calculate its hash value. The MD5 algorithm is a widely used hash function that can convert data of any length into a fixed-length 128-bit hash value. This process can be implemented using an existing MD5 calculation tool or library. In addition, the starting position, size, and calculated MD5 value of each segment are recorded, and this information will be used for subsequent analysis and processing. Among them, the calculated MD5 value is compared with the expected or previously stored MD5 value, which can help detect whether the file has been damaged or tampered with during transmission, storage, or processing. If the MD5 value of a segment is found to be inconsistent with the expected value, it indicates that there may be a problem with the segment, and the data of the segment needs to be further checked to confirm whether there is an error or anomaly. The report can include the MD5 value of each segment, the comparison result, the anomaly information, and possible processing suggestions.

[0055] Specifically, assume that there are two different scenarios: Scenario 1 is that the atomic write switch is not turned on, and Scenario 2 is that the atomic write switch is turned on; read IO from address 1 (i.e., the embedded area) to the verification file, and calculate the MD5 of each segment of the verification file according to the atomic write configuration size; MD5 is used as a data consistency check. MD5 is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure that information transmission is complete and consistent. The MD5 codes of different files are independent and unique. That is to say, if the data of a file changes, the corresponding MD5 will definitely have different changes.

[0056] Among them, scenario 1 is to turn on the atomic write switch, and compare the MD5 codes corresponding to the atomic write sizes of the verification file with the embedded file and the test file respectively. It can be found that the MD5 codes at positions 1 and 2 are the same as the embedded file, the MD5 at position 3 is different from both the embedded file and the test file, and the MD5 at position 4 and the positions thereafter are the same as the embedded file; because the atomic write function is not turned on, if the IO process is abnormally interrupted, the MD5 of a certain file will be different from the expected MD5 of the embedded file or the test file.

[0057] Among them, scenario 2 is to turn on the atomic write switch. By comparing the MD5 code after overwriting, it can be found that the MD5 codes at positions 1 and 2 are the same as the pre-embedded file, and the positions 3 and thereafter are the same as the pre-embedded file. Since the atomic write function is turned on, atomic write will ensure that each data sent is either completely successful or completely failed. If the IO at position 3 is interrupted by an abnormality, all data will be rolled back, and the minimum atomicity of the data will not be broken.

[0058] Specifically, the entire test flow reflects the overall test logic. Since the interruption of the IO process is unknown, it is necessary to perform a full-scale cyclic comparison of all MD5s until the last MD5 is compared and the result is judged. The analysis results include pass, fail, or retest; pass means that the atomic write scene is turned on and the atomic write function is normal; fail means that the atomic write scene is turned off or the atomic write scene is turned on but the function is not normal; retest means that the IO interruption failed or the IO was completed when the interruption was performed, resulting in the interruption not actually taking effect.

[0059] The present invention can effectively verify the atomic write function of the SSD during the IO interruption process, ensure the integrity and consistency of the data according to the design of the SSD atomic write function after the interruption occurs, and trigger a failure scenario when the atomic write function is turned off, so that the tester can directly observe the difference between turning the atomic write function on and off. That is, by using this SSD atomic write function test method based on the IO process interruption scenario, the performance and reliability of the SSD can be effectively evaluated, providing strong support for the research and development, production and application of the SSD.

[0060] See also Figure 2 As shown, the present invention also discloses an atomic write function test device for SSD based on IO process interruption scenario, including: an acquisition configuration unit 10, a generation unit 20, a writing unit 30, an overwriting interruption unit 40, a reading unit 50 and an analysis unit 60;

[0061] The acquisition configuration unit 10 is used to acquire SSD disk parameters and configure them to obtain configuration information;

[0062] The generating unit 20 is used to generate the pre-embedded file and the test file according to the configuration information;

[0063] The writing unit 30 is used to write the pre-embedded file into the SSD to obtain the pre-embedded area;

[0064] The overwriting interruption unit 40 is used to overwrite the pre-embedded area with the test file and perform IO write exception interruption;

[0065] The reading unit 50 is used to read the overwritten file to obtain a verification file;

[0066] The analysis unit 60 is used to analyze and process the verification file to obtain an analysis result.

[0067] In one embodiment, the configuration acquisition unit 10 configures the SSD atomic write size, ie, the configuration information, according to the SSD disk parameters.

[0068] In one embodiment, the writing unit 30 sends the pre-embedded file to the IO, writes the data to the SSD, and records the write address, that is, the pre-embedded area.

[0069] In one embodiment, the overwriting interruption unit 40 sends an IO to write the test file to the pre-embedded area for overwriting, and sends an instruction to interrupt the IO process during the writing process.

[0070] In one embodiment, the analysis unit 60 calculates the MD5 of each segment in the verification file according to the atomic write configuration size to obtain calculation information, and then analyzes and processes the calculation information to obtain an analysis result.

[0071] It should be noted that technical personnel in the relevant field can clearly understand that the specific implementation process of the atomic write function test device and each unit of the above-mentioned SSD based on the IO process interruption scenario can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.

[0072] The atomic write function test device for SSD based on IO process interruption scenario can be implemented in the form of a computer program. The computer program can be used in Figure 3 Runs on the computer device shown.

[0073] See also Figure 3 , Figure 3 is a schematic block diagram of a computer device provided in an embodiment of the present application; the computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.

[0074] See also Figure 3 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0075] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute an atomic write function test method of an SSD based on an IO process interruption scenario.

[0076] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0077] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute an atomic write function test method of the SSD based on the IO process interruption scenario.

[0078] The network interface 505 is used to communicate with other devices over the network. Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0079] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:

[0080] Obtain SSD disk parameters and configure them to obtain configuration information; generate embedded files and test files according to the configuration information; write the embedded files to the SSD to obtain the embedded area; use the test file to overwrite the embedded area and perform IO write exception interruption; read the overwritten file to obtain the verification file; analyze and process the verification file to obtain the analysis result.

[0081] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0082] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0083] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned SSD atomic write function test method based on the IO process interruption scenario can be implemented. The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned method can be implemented. The program instructions include the following steps:

[0084] Obtain SSD disk parameters and configure them to obtain configuration information; generate embedded files and test files according to the configuration information; write the embedded files to the SSD to obtain the embedded area; use the test file to overwrite the embedded area and perform IO write exception interruption; read the overwritten file to obtain the verification file; analyze and process the verification file to obtain the analysis result.

[0085] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0086] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0087] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0088] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0089] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0090] The above embodiments are preferred implementation schemes of the present invention. In addition, the present invention may also be implemented in other ways. Any obvious replacement without departing from the concept of the present technical solution is within the protection scope of the present invention.

Claims

1. The atomic write function test method of SSD based on the IO process interruption scenario is characterized by: The following steps are involved: Get the SSD disk parameters and configure them to get the configuration information; Generate pre-embedded files and test files according to configuration information; Write the embedded file into the SSD to obtain the embedded area; Use the test file to overwrite the embedded area and perform IO write exception interruption; Read the overwritten file to obtain the verification file; The verification file is analyzed and processed to obtain the analysis result.

2. The atomic write function test method of SSD based on IO process interruption scenario according to claim 1 is characterized in that: In the step of acquiring SSD disk parameters and configuring to obtain configuration information, the SSD atomic write size, that is, the configuration information, is configured according to the SSD disk parameters.

3. The atomic write function test method of SSD based on IO process interruption scenario according to claim 1 is characterized in that: In the step of writing the pre-embedded file into the SSD to obtain the pre-embedded area, the pre-embedded file is sent down to the IO, and the data is written into the SSD, and the write address, that is, the pre-embedded area, is recorded.

4. The atomic write function test method of SSD based on IO process interruption scenario according to claim 1 is characterized in that: In the step of using the test file to overwrite the pre-embedded area and executing the IO write exception interruption step, the test file is sent to the pre-embedded area for IO writing to overwrite, and an instruction is sent to interrupt the IO process during the writing process.

5. The method for testing the atomic write function of SSD based on the IO process interruption scenario according to claim 2 is characterized in that: In the step of analyzing and processing the verification file to obtain the analysis result, the MD5 of each segment in the verification file is calculated according to the atomic write configuration size to obtain calculation information, and then the calculation information is analyzed and processed to obtain the analysis result.

6. The atomic write function test device of SSD based on the IO process interruption scenario is characterized by: include: Get configuration unit, generation unit, writing unit, overwrite interruption unit, reading unit and analysis unit; The configuration acquisition unit is used to acquire SSD disk parameters and perform configuration to obtain configuration information; The generating unit is used to generate the pre-embedded file and the test file according to the configuration information; The writing unit is used to write the pre-embedded file into the SSD to obtain the pre-embedded area; The overwriting interruption unit is used to overwrite the pre-embedded area with the test file and perform IO write exception interruption; The reading unit is used to read the overwritten file to obtain a verification file; The analysis unit is used to analyze and process the verification file to obtain an analysis result.

7. The atomic write function test device for SSD based on IO process interruption scenario according to claim 6 is characterized in that: In the configuration acquisition unit, the SSD atomic write size, that is, the configuration information, is configured according to the SSD disk parameters.

8. The atomic write function test device for SSD based on IO process interruption scenario according to claim 6, characterized in that: In the writing unit, the pre-embedded file is sent down as IO, and the data is written into the SSD, and the writing address, i.e., the pre-embedded area, is recorded.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the atomic write function test method of the SSD based on the IO process interruption scenario according to any one of claims 1 to 5 when executing the computer program.

10. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the atomic write function test method of the SSD based on the IO process interruption scenario according to any one of claims 1 to 5 can be implemented.

Citation Information

Cited By

  • Performance test method for static trusted protection file and related device

    CN120196529A