Data block verification method and apparatus, non-volatile readable storage medium, and electronic device

By performing partition checksum replacement of the flash memory space before BMC restart or upgrade, the problem of slow configuration partition exception handling caused by hard failure of Flash particles is solved, and efficient exception handling and cost savings are achieved.

WO2025138566A1PCT designated stage expired Publication Date: 2025-07-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/095583
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-27
Filing Date
2024-05-27
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

In the prior art, the hard failure of Flash particles during BMC restart or upgrade results in slow processing of configuration partition exceptions and low efficiency, which cannot be effectively solved.

Method used

Before the single board management controller loads the configuration partition, determines the space division information of the flash memory space, uses the file system format of the target file to verify the partition, identify bad blocks and replace healthy partitions, and ensures that the target file is loaded in a reliable partition.

Benefits of technology

Improves the detection efficiency of Flash particles hard failure, reduces maintenance costs, avoids hardware problems caused by software bugs, and ensures the stability of configuration partitions and efficient processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024095583_03072025_PF_FP_ABST
    Figure CN2024095583_03072025_PF_FP_ABST
Patent Text Reader

Abstract

A data block verification method and apparatus, a non-volatile readable storage medium, and an electronic device. The method comprises: when a baseboard management controller loads a target file corresponding to a configuration partition, determining space division information corresponding to a flash memory space associated with the baseboard management controller; on the basis of the space division information, determining a first partition used for storing the target file in the flash memory space; and verifying a data block in the first partition by means of the file system format of the target file to obtain a first verification result. That is, by verifying a corresponding storage partition before a target file is written, bad blocks of the partition are determined in advance, thereby improving the efficiency of detecting flash chip damage caused by excessive use of a partition due to software bugs; thus, the problem in the related art of slow and inefficient handling of configuration partition anomalies when hard failures of flash chips occur during upgrades or BMC restarts can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Data block verification method and device, non-volatile readable storage medium and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 27, 2023, with application number 202311820665.2, and entitled “Data Block Verification Method and Device, Storage Medium and Electronic Device,” all contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of communications, and in particular, to a data block verification method and device, a non-volatile readable storage medium, and an electronic device. Background Art

[0004] In the storage or server software stack, the BMC (Baseboard Management Controller) is primarily responsible for managing the hardware status of the boards in the storage frame and assisting in the collection of X86 location information. As more and more customers have differentiated configurations, the BMC needs to provide a customer configuration item interface to facilitate different customers to configure different parameters. The BMC itself also has some basic configurations that need to be issued by the OS (Operating System). Therefore, when designing the BMC, a configuration partition (Conf partition) is specifically allocated from the flash memory space that stores the BMC board management controller image. This is used for the BMC itself and for differentiated customer configurations. The Conf partition is also mounted as a file system and supports real-time modification. In actual project applications, code bugs may trigger excessive use of the Conf partition Flash, even exceeding the erase and write count, greatly increasing the probability of bad blocks in the Conf partition Flash.

[0005] In the related art, in order to solve the above problem, it is proposed that the BMC only verifies the files in the Conf partition when the Conf partition file system (JFFS2) is mounted. If the verification fails, the entire Conf partition Flash is erased, and then the default configuration is updated to the Conf partition. Finally, the customer configuration is manually added. However, due to the failure model of Flash itself, there is a Flash soft failure model "Flash bit errors can be resolved by erasing, and then normal use can continue." Therefore, the above solution can solve the failure mode of Flash due to soft failure inside the particles. However, the above solution still requires the customer to manually add the configuration again, and the above solution will not be able to effectively handle the hard failure of the Flash particles that occurs during each upgrade or BMC restart, resulting in slow and low processing efficiency for configuration exceptions.

[0006] In the related art, when a Flash particle hard failure occurs each time an upgrade or a BMC restart occurs, the problem of slow and inefficient exception handling for configuration partitions has not been effectively solved.

[0007] Summary of the Invention

[0008] The embodiments of the present application provide a data block verification method and apparatus, a non-volatile readable storage medium, and an electronic device to at least address the problem in the related art of slow and inefficient exception handling for configuration partitions when Flash particles fail during each upgrade or BMC restart.

[0009] According to the first aspect of an embodiment of the present application, a method for verifying a data block is provided, comprising: determining space division information corresponding to a flash memory space associated with the single board management controller when the single board management controller loads a target file corresponding to a configuration partition; determining a first partition in the flash memory space for storing the target file based on the space division information; and verifying the data block in the first partition using the file system format of the target file to obtain a first verification result.

[0010] In an exemplary embodiment, after verifying the data blocks in the first partition using the file system format of the target file and obtaining a first verification result, the method further includes: determining to continue loading the target file into the first partition if the first verification result indicates that the data blocks in the first partition pass the verification; and adding a first mark to the first partition that prohibits loading the target file if the first verification result indicates that the data blocks in the first partition fail the verification.

[0011] In an exemplary embodiment, when the first verification result indicates that the data block in the first partition has failed the verification, after adding a first mark to the first partition that prohibits loading the target file, the above method also includes: reading a mapping configuration file corresponding to the first partition for indicating the partition address; determining the partition numbers of multiple partitions currently started in the flash memory space according to the mapping configuration file; and configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, wherein the second partition has the same number of data blocks as the first partition.

[0012] In an exemplary embodiment, before reading the mapping configuration file corresponding to the first partition for indicating the partition address, the above method also includes: determining a read-only memory associated with the single board management controller; obtaining a preset mapping configuration file corresponding to the flash memory space associated with the single board management controller; and storing the preset mapping configuration file on the read-only memory.

[0013] In an exemplary embodiment, after configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, the above method also includes: adding a second tag to the second partition; when it is determined that the addition of the second tag is completed, sending a reset instruction to the single board management controller, wherein the reset instruction is used to instruct the single board management controller to reopen the loading of the target file.

[0014] In an exemplary embodiment, when a first verification result indicates that a data block in a first partition passes verification, determining to continue loading a target file into the first partition includes: obtaining a first type of configuration file in a random access memory included in a single board management controller; and determining the first type of configuration file as a target file to be loaded into the first partition.

[0015] In an exemplary embodiment, before obtaining the first type of configuration file in the random access memory contained in the single board management controller, the above method also includes: when it is determined that no configuration file exists in the random access memory, obtaining the image file corresponding to the single board management controller; and determining the initial configuration file corresponding to the image file as the target file to be loaded into the first partition.

[0016] In an exemplary embodiment, before the single-board management controller loads the target file corresponding to the configuration partition, the above method also includes: obtaining the modification information sent by the target object to the single-board management controller; determining the modification content corresponding to the target file based on the modification information; writing the modification content into the storage space corresponding to the random access memory contained in the single-board management controller, updating the first type of configuration file already existing in the storage space to obtain a second type of configuration file; performing a loading operation on the second type of configuration file, wherein the loading operation is used to indicate that the second configuration file in the random access memory is loaded into the flash memory space.

[0017] In an exemplary embodiment, a next partition adjacent to a first partition is configured as a second partition for loading a target file according to a partition number, including: updating the second partition to a storage partition corresponding to the target file to be loaded by the first partition; and generating a target log for replacing the second partition with the first partition when the update is completed.

[0018] In an exemplary embodiment, after configuring the next partition adjacent to the first partition as the second partition for loading the target file according to the partition number, the above method also includes: identifying whether the second partition is the last partition in the flash memory space; if it is determined that the second partition is the last partition, generating an early warning log for the flash memory space, wherein the early warning log is used to indicate that the partition in the flash memory space cannot be replaced.

[0019] In an exemplary embodiment, after determining that the second partition is the last partition, the above method also includes: using the file system format of the target file to verify the data block in the second partition to obtain a second verification result; and determining whether to skip loading the target file during the startup process of the single board management controller based on the second verification result.

[0020] In an exemplary embodiment, determining whether to skip loading the target file during the startup of the single board management controller is based on the second verification result, including: when the second verification result indicates that the data block in the second partition passes the verification, determining to continue loading the target file into the second partition; when the second verification result indicates that the data block in the second partition fails the verification, instructing the single board management controller to skip loading the target file during the startup.

[0021] In an exemplary embodiment, after instructing the single board management controller to skip loading the target file during startup, the above method also includes: obtaining startup information of the single board management controller; when it is determined based on the startup information that the single board management controller has completed startup, determining to generate a fault log indicating that there is a hardware fault in the flash memory space associated with the single board management controller.

[0022] In an exemplary embodiment, the above method also includes: identifying all logs generated by the single-board management controller during the entire startup process; when there are warning logs and fault logs in all logs, sending fault prompt information to the management object of the single-board management controller, wherein the fault prompt information is used to instruct the management object to physically replace the flash memory space corresponding to the single-board management controller.

[0023] In an exemplary embodiment, the size of the first partition corresponds to the partition size required by the data corresponding to the target file.

[0024] In an exemplary embodiment, the first partition is composed of a plurality of sub-partitions corresponding to the flash memory space.

[0025] In an exemplary embodiment, the method further includes: checking whether the flash memory fault warning and the flash memory fault are set; if the flash memory fault warning is set, reporting the flash memory fault warning; if both the flash memory fault warning and the flash memory fault are set, reporting the flash memory fault alarm.

[0026] According to the second aspect of an embodiment of the present application, a data block verification device is provided, including: a first determination module, configured to determine space division information corresponding to a flash memory space associated with a single board management controller when the single board management controller loads a target file corresponding to a configuration partition; a second determination module, configured to determine a first partition in the flash memory space for storing the target file based on the space division information; and a verification module, configured to verify the data block in the first partition using the file system format of the target file to obtain a first verification result.

[0027] In an exemplary embodiment, the above-mentioned device also includes an indication module, which is configured to use the file system format of the target file to verify the data blocks in the first partition. After obtaining a first verification result, if the first verification result indicates that the data blocks in the first partition pass the verification, it is determined to continue loading the target file into the first partition; if the first verification result indicates that the data blocks in the first partition fail the verification, a first mark is added to the first partition to prohibit loading the target file.

[0028] In an exemplary embodiment, the above-mentioned indication module also includes: a configuration unit, which is configured to add a first mark prohibiting the loading of the target file to the first partition when the first verification result indicates that the data block in the first partition has not passed the verification, and then read the mapping configuration file corresponding to the first partition for indicating the partition address; determine the partition numbers of multiple partitions currently started in the flash memory space according to the mapping configuration file; and configure the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, wherein the second partition has the same number of data blocks as the first partition.

[0029] In an exemplary embodiment, the above-mentioned indication module also includes: a first acquisition unit, which is configured to determine the read-only memory associated with the single board management controller before reading the mapping configuration file corresponding to the first partition for indicating the partition address; obtain a preset mapping configuration file corresponding to the flash memory space associated with the single board management controller; and store the preset mapping configuration file on the read-only memory.

[0030] In an exemplary embodiment, the above-mentioned indication module also includes: a reset unit, which is configured to configure the next partition adjacent to the first partition as the second partition for loading the target file according to the partition number, and then add a second mark to the second partition; when it is determined that the addition of the second mark is completed, a reset instruction is sent to the single board management controller, wherein the reset instruction is used to instruct the single board management controller to reopen the loading of the target file.

[0031] In an exemplary embodiment, the above-mentioned instruction module is further configured to obtain a first type of configuration file in a random access memory included in the board management controller; and determine the first type of configuration file as a target file to be loaded into the first partition.

[0032] In an exemplary embodiment, the above-mentioned indication module also includes: a second acquisition unit, which is configured to obtain the first type of configuration file in the random access memory contained in the single board management controller before obtaining it, and when it is determined that no configuration file exists in the random access memory, obtain the image file corresponding to the single board management controller; and determine the initial configuration file corresponding to the image file as the target file to be loaded into the first partition.

[0033] In an exemplary embodiment, the above-mentioned device also includes: a modification module, which is configured to obtain the modification information sent by the target object to the single-board management controller before the single-board management controller loads the target file corresponding to the configuration partition; determine the modification content corresponding to the target file based on the modification information; write the modification content into the storage space corresponding to the random access memory contained in the single-board management controller, update the first type of configuration file already existing in the storage space, and obtain a second type of configuration file; perform a loading operation on the second type of configuration file, wherein the loading operation is used to indicate that the second configuration file in the random access memory is loaded into the flash memory space.

[0034] In an exemplary embodiment, the configuration unit is further configured to update the second partition to a storage partition corresponding to the target file to be loaded by the first partition; and upon completion of the update, generate a target log for replacing the second partition with the first partition.

[0035] In an exemplary embodiment, the above-mentioned indication module also includes: an early warning unit, which is configured to configure the next partition adjacent to the first partition as the second partition for loading the target file according to the partition number, and then identify whether the second partition is the last partition in the flash memory space; when it is determined that the second partition is the last partition, generate an early warning log of the flash memory space, wherein the early warning log is used to indicate that the partition in the flash memory space cannot be replaced.

[0036] In an exemplary embodiment, the above-mentioned early warning unit also includes: a verification sub-unit, which is configured to, after determining that the second partition is the last partition, use the file system format of the target file to verify the data blocks in the second partition to obtain a second verification result; and determine whether to skip loading the target file during the startup process of the single-board management controller based on the second verification result.

[0037] In an exemplary embodiment, the above-mentioned verification sub-unit is also configured to determine to continue loading the target file into the second partition when the second verification result indicates that the data block in the second partition has passed the verification; and to instruct the single board management controller to skip loading the target file during the startup process when the second verification result indicates that the data block in the second partition has not passed the verification.

[0038] In an exemplary embodiment, the above-mentioned early warning unit also includes: a fault unit, which is configured to instruct the single board management controller to skip loading the target file during the startup process, and then obtain the startup information of the single board management controller; when it is determined that the single board management controller has completed the startup based on the startup information, it is determined to generate a fault log indicating that there is a hardware fault in the flash memory space associated with the single board management controller.

[0039] In an exemplary embodiment, the above-mentioned device also includes: a prompt module, which is configured to identify all logs generated by the single-board management controller during the entire startup process; when there are both warning logs and fault logs in all logs, a fault prompt information is sent to the management object of the single-board management controller, wherein the fault prompt information is used to instruct the management object to physically replace the flash memory space corresponding to the single-board management controller.

[0040] According to a third aspect of the embodiments of the present application, a non-volatile readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0041] According to a fourth aspect of the embodiments of the present application, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.

[0042] Through the embodiments of the present application, when the single-board management controller loads the target file corresponding to the configuration partition, the space division information corresponding to the flash memory space associated with the single-board management controller is determined; the first partition in the flash memory space for storing the target file is determined based on the space division information; the data block in the first partition is verified using the file system format of the target file to obtain a first verification result, and then before the single-board management controller loads the target file corresponding to the configuration partition, the file system format of the target file can be used to verify different partitions in the flash memory space. By verifying the corresponding storage partition before writing the target file, the bad block situation of the partition is determined in advance, thereby improving the detection efficiency of software bugs that cause excessive use of a partition and damage to the Flash particles. Therefore, it can solve the problem in the related technology that the exception handling of the configuration partition is slow and the processing efficiency is low when the Flash particles fail hard each time the upgrade or BMC restarts, thereby saving the maintenance cost of the single-board management controller and avoiding the return of the board due to hardware problems triggered by software bugs. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] FIG1 is a hardware structure block diagram of a computer terminal for a data block verification method according to an embodiment of the present application;

[0044] FIG2 is a flow chart of a data block verification method according to an embodiment of the present application;

[0045] FIG3 is a schematic diagram of an optional division of the flash memory space Flsah according to an embodiment of the present application;

[0046] FIG4 is a schematic diagram of an optional bad block replacement in a Conf partition according to an embodiment of the present application;

[0047] FIG5 is a schematic diagram of an optional BMCConf partition bad block detection and automatic replacement software flow according to an embodiment of the present application;

[0048] FIG6 is a flow chart of an optional BMCConf file writing software according to an embodiment of the present application;

[0049] FIG7 is a structural block diagram of a data block verification device according to an embodiment of the present application;

[0050] FIG8 is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the embodiments of the present application.

[0052] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0053] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing system. Taking operation on a computer terminal as an example, FIG1 is a hardware structure block diagram of a computer terminal of a data block verification method in an embodiment of the present application. As shown in FIG1 , the computer terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing system such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 and an input / output device 108 configured to have a communication function. It will be understood by those skilled in the art that the structure shown in FIG1 is only illustrative and does not limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than those shown in FIG1 , or have different configurations with equivalent functions or more functions than those shown in FIG1 .

[0054] The memory 104 can be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data block verification method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage systems, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 includes a memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0055] The transmission device 106 is configured to receive or transmit data via a network. Examples of such a network include a wireless network provided by a communications provider of the computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices via a base station to enable communication with the Internet.

[0056] In this embodiment, a data block verification method is provided, which is applied to the above-mentioned computer terminal. FIG2 is a flow chart of an optional data block verification method according to an embodiment of the present application. The flow chart includes the following steps:

[0057] Step S202, when the board management controller loads the target file corresponding to the configuration partition, determining space partition information corresponding to the flash memory space associated with the board management controller;

[0058] It should be noted that to ensure the effective division of the flash memory space corresponding to the board management controller, partition planning of the flash memory space Flsah corresponding to the board management controller is required during BMC design. Figure 3 is a schematic diagram of an optional partitioning of the flash memory space Flsah according to an embodiment of the present application. The BMC-Flash uses the remaining space, Flash address B to Flash end address A', as the partition for replacing Conf. The maximum number of Conf replacements that can be completed is N, based on the remaining space size (Flash address B to A) / (Conf partition size).

[0059] In addition, to better understand the solution, the functions of various resources in the board management controller (BMC) are explained. As shown in Figure 3, BMC-FLASH is used to store BMC code images, configuration files, logs, etc.; DDR is used to run BMC code; and the BMC's on-chip RAM serves as a mirror for the BMC-Conf partition file.

[0060] Secondly, the RAM in the above-mentioned single board management controller BMC is used to save the BMC Conf partition content in real time, including the BMC basic configuration and customer configuration. In actual application, in order to ensure that RAM data is not lost during power failure, the RAM power supply here is changed to button battery power supply.

[0061] Step S204, determining a first partition in the flash memory space for storing the target file according to the space division information;

[0062] It should be noted that the first partition refers to a partition corresponding to the partition size required by the data corresponding to the target file. In actual applications, the first partition may be composed of multiple sub-partitions corresponding to the flash memory space Flsah.

[0063] Step S206: Verify the data blocks in the first partition using the file system format of the target file to obtain a first verification result.

[0064] Simply put, in the Linux system, the Flash physical area and the file system are connected through the MTD (memory technology device) device layer. To complete the dynamic replacement of the Conf partition, the physical address of the Flash partition needs to be configured when the MTD device is loaded.

[0065] Optionally, Figure 4 is a schematic diagram of an optional Conf partition bad block replacement according to an embodiment of the present application. Optionally, when the Conf partition JFF2 file system is mounted, when the MTD device is loaded, the address range for storing the partition to be replaced can be determined according to the Conf partition address configuration file, that is, the dynamic replacement of the Conf partition physical Flash space can be completed through the configuration file when the MTD device is loaded.

[0066] The data structure attributes of the configuration files of Conf to ConfN include at least the following contents, as shown in Table 1 (the addresses are example addresses).

[0067] Table 1: Conf partition address mapping configuration file;

[0068] As an optional implementation, the BMC's initial Conf partition starts at Conf0. Before loading the JFF2 file system in the Conf0 partition, the BMC verifies the Conf partition's Flash memory according to the JFF2 file system format. If the verification passes, the loading continues. If it fails, the BMC reads the "Conf Partition Address Mapping Configuration File" to find the number of the currently booted Conf partition and sets its damaged flag to TRUE. The BMC then sets the boot flag of the next adjacent Conf partition to Enable, resets the BMC, and restarts the loading process.

[0069] Through the above steps, when the single board management controller loads the target file corresponding to the configuration partition, the space division information corresponding to the flash memory space associated with the single board management controller is determined; the first partition in the flash memory space for storing the target file is determined according to the space division information; the data block in the first partition is verified using the file system format of the target file to obtain a first verification result, and then before the single board management controller loads the target file corresponding to the configuration partition, the file system format of the target file can be used to verify different partitions in the flash memory space. By verifying the corresponding storage partition before writing the target file, the bad block status of the partition is determined in advance, which improves the detection efficiency of software bugs that cause excessive use of a partition and damage to the Flash particles. Therefore, it can solve the problem in the related technology that the exception handling of the configuration partition is slow and the processing efficiency is low when the Flash particles fail hard each time the BMC is upgraded or restarted, thereby saving the maintenance cost of the single board management controller and avoiding the return of the board due to hardware problems triggered by software bugs.

[0070] In an exemplary embodiment, after verifying the data blocks in the first partition using the file system format of the target file and obtaining a first verification result, the method further includes: determining to continue loading the target file into the first partition if the first verification result indicates that the data blocks in the first partition pass the verification; and adding a first mark to the first partition that prohibits loading the target file if the first verification result indicates that the data blocks in the first partition fail the verification.

[0071] It can be understood that after the partition where the target file is to be stored is verified through the file system format, when the verification fails, it means that there is an abnormality in the partition at this time. When the verification succeeds, it means that the current partition can load the target file normally. Optionally, the above-mentioned target file can be a code image and configuration file, log, etc. corresponding to the single-board management controller. In addition, when an abnormality is found in the partition through verification, the partition can be replaced, and the partition that has not passed the verification can be marked, so that when the target file is loaded subsequently, loading to the partition with the abnormality can be avoided.

[0072] In summary, through the above implementation, whether the process of writing the target file into the current partition is normal is determined by the verification result, and then the abnormal situation is identified and the partition is adjusted.

[0073] In an exemplary embodiment, when the first verification result indicates that the data block in the first partition has failed the verification, after adding a first mark to the first partition that prohibits loading the target file, the above method also includes: reading a mapping configuration file corresponding to the first partition for indicating the partition address; determining the partition numbers of multiple partitions currently started in the flash memory space according to the mapping configuration file; and configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, wherein the second partition has the same number of data blocks as the first partition.

[0074] Understandably, when selecting the flash memory for the single-board management controller, hardware typically chooses large capacity because of its relative affordability. Furthermore, the remaining flash memory space is between 30% and 50%. When mounting the Conf partition file system, if the BMC detects corruption in the Conf partition, it automatically allocates an area from the remaining flash memory as the Conf partition until the free flash space is used up. Furthermore, to ensure that the target file can be loaded into the new partition, the newly allocated second partition must contain the same amount of data blocks as the first partition.

[0075] In summary, through the above implementation, when a partition is found to be damaged or abnormal, partitions of the same size are re-divided from the free space in the flash memory space. Therefore, when there is a hardware failure such as particle failure in the flash memory space, the writing process of the target file will not be affected by replacing the partition, thereby improving the stability of the target file loading.

[0076] In an exemplary embodiment, before reading the mapping configuration file corresponding to the first partition for indicating the partition address, the above method also includes: determining a read-only memory associated with the single board management controller; obtaining a preset mapping configuration file corresponding to the flash memory space associated with the single board management controller; and storing the preset mapping configuration file on the read-only memory.

[0077] For example, in actual applications, to facilitate the BMC to read the "Conf partition address mapping configuration file" when loading the MTD device or JFF2 scan, the "Conf partition address mapping configuration file" can be saved in the onboard E2PROM. This allows the current BMC's Conf partition address mapping configuration file to be quickly loaded during application, providing a data reference for subsequent partition replacement and avoiding repeated replacement.

[0078] In summary, through the above implementation, the preset mapping configuration file corresponding to the flash memory space is effectively stored, avoiding the influence of other data, and improving the accuracy of using the preset mapping configuration file as a reference file for partition replacement.

[0079] In an exemplary embodiment, after configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, the above method also includes: adding a second tag to the second partition; when it is determined that the addition of the second tag is completed, sending a reset instruction to the single board management controller, wherein the reset instruction is used to instruct the single board management controller to reopen the loading of the target file.

[0080] For example, the initial Conf partition of the BMC starts from Conf0. Before the BMC loads the JFF2 file system of the Conf0 partition, it will verify the Flash of the Conf partition according to the JFF2 file system format. If the verification passes, the loading will continue. If it fails, the "Conf partition address mapping configuration file" will be read to find the number of the currently started Conf partition and set its damaged flag to TRUE. Then the startup flag of the next adjacent Conf partition will be set to Enable, the BMC will be reset, and the loading process will be restarted. When loading again, if it is found that the new Conf partition is good, the Conf file in the on-chip RAM (which will not be lost during power failure) will be written to the new Conf partition. After the BMC is started, during operation, if the customer modifies the content of the Conf file, it will be written to RAM (Random Access Memory) first, and then written to Flash.

[0081] It should be noted that, in order to ensure that the RAM continuously stores the Conf file, an independent power supply is provided for the RAM in the current single board management controller. Optionally, the independent power supply may be a button battery.

[0082] In summary, through the above implementation, after completing the replacement of the partition, in order to ensure the writing of the target file, the single board management controller needs to be reset, and the single board management controller is instructed to restart the loading and verification process of the target file. Since the first partition that fails the verification is replaced with the second partition that passes the verification, the target file can be effectively loaded into the flash memory space.

[0083] In an exemplary embodiment, when a first verification result indicates that a data block in a first partition passes verification, determining to continue loading a target file into the first partition includes: obtaining a first type of configuration file in a random access memory included in a single board management controller; and determining the first type of configuration file as a target file to be loaded into the first partition.

[0084] In an exemplary embodiment, before obtaining the first type of configuration file in the random access memory contained in the single board management controller, the above method also includes: when it is determined that no configuration file exists in the random access memory, obtaining the image file corresponding to the single board management controller; and determining the initial configuration file corresponding to the image file as the target file to be loaded into the first partition.

[0085] As an optional implementation, before loading the Conf partition file system, first verify the Conf partition. If the verification succeeds, the Conf partition file system is loaded. If the verification fails, determine whether the partition is already in use. If not, write the Conf file in the on-chip RAM to the new Conf partition, and set the "Use Flag" entry for the corresponding Conf partition in the "Conf Partition Address Mapping Configuration File" to "True." If there is no Conf file in the on-chip RAM, write the new Conf partition using the initial Conf file in the BMC-Image. If it is already in use, update the "Damage Flag" entry for the corresponding Conf partition in the "Conf Partition Address Mapping Configuration File" to "True." Set the "Enable Flag" for the next partition to "Enable."

[0086] In summary, through the above implementation, in order to ensure that data is loaded into the flash memory space through the random access memory, the configuration file is written in different situations according to the verification result, thereby improving the configuration efficiency of the BMC Conf file.

[0087] In an exemplary embodiment, before the single-board management controller loads the target file corresponding to the configuration partition, the above method also includes: obtaining the modification information sent by the target object to the single-board management controller; determining the modification content corresponding to the target file based on the modification information; writing the modification content into the storage space corresponding to the random access memory contained in the single-board management controller, updating the first type of configuration file already existing in the storage space to obtain a second type of configuration file; performing a loading operation on the second type of configuration file, wherein the loading operation is used to indicate that the second configuration file in the random access memory is loaded into the flash memory space.

[0088] In an exemplary embodiment, a next partition adjacent to a first partition is configured as a second partition for loading a target file according to a partition number, including: updating the second partition to a storage partition corresponding to the target file to be loaded by the first partition; and generating a target log for replacing the second partition with the first partition when the update is completed.

[0089] In an exemplary embodiment, after configuring the next partition adjacent to the first partition as the second partition for loading the target file according to the partition number, the above method also includes: identifying whether the second partition is the last partition in the flash memory space; if it is determined that the second partition is the last partition, generating an early warning log for the flash memory space, wherein the early warning log is used to indicate that the partition in the flash memory space cannot be replaced.

[0090] Simply put, before starting the next Conf partition, a partition replacement log must be recorded. Then determine whether it is the last Conf partition. If it is the last Conf partition, record a Flash fault warning. Then reset the BMC to restart execution. During the MTD device loading phase started by the BMC, search for the "Conf partition address mapping configuration file" to determine the enable mark, damage mark, and use mark. When the partition is enabled and not damaged, the available partition is found, and then the Flash address corresponding to the partition is loaded into the Flash start address and end address members in the MTD device data structure. Continue to start until the Conf partition file system is loaded. First, verify the Conf partition. If the verification is successful, load the Conf partition file system. If the verification fails, then determine whether the partition is in use.

[0091] In summary, through the above implementation, the partition replacement performed in the flash memory space can be recorded by recording the replacement log. In addition, by determining whether there are partitions that may be used for replacement in the flash memory space, the validity of the current flash memory space is determined, and if the flash memory space does not meet the replacement requirements, the flash memory space is hard replaced.

[0092] In an exemplary embodiment, after determining that the second partition is the last partition, the above method also includes: using the file system format of the target file to verify the data block in the second partition to obtain a second verification result; and determining whether to skip loading the target file during the startup process of the single board management controller based on the second verification result.

[0093] As an optional implementation, if no available Conf partition is found, a Conf partition Flash failure is recorded, loading of the Conf partition is skipped, and the BMC is started continuously.

[0094] In an exemplary embodiment, determining whether to skip loading the target file during the startup of the single board management controller is based on the second verification result, including: when the second verification result indicates that the data block in the second partition passes the verification, determining to continue loading the target file into the second partition; when the second verification result indicates that the data block in the second partition fails the verification, instructing the single board management controller to skip loading the target file during the startup.

[0095] In an exemplary embodiment, after instructing the single board management controller to skip loading the target file during startup, the above method also includes: obtaining startup information of the single board management controller; when it is determined based on the startup information that the single board management controller has completed startup, determining to generate a fault log indicating that there is a hardware fault in the flash memory space associated with the single board management controller.

[0096] In an exemplary embodiment, the above method also includes: identifying all logs generated by the single-board management controller during the entire startup process; when there are warning logs and fault logs in all logs, sending fault prompt information to the management object of the single-board management controller, wherein the fault prompt information is used to instruct the management object to physically replace the flash memory space corresponding to the single-board management controller.

[0097] Simply put, when a Conf partition fails, a new Conf partition replaces the old one. A log is recorded for each Conf partition replacement. When the last Conf partition is replaced, a flash fault warning log is recorded. If the last partition also fails, the BMC skips loading the Conf partition's file system during startup. After BMC startup completes, a flash fault alarm for the Conf partition is reported. Optionally, the system checks whether the "Flash Fault Warning" and "Flash Failure" bits are set. If "Flash Failure Warning" is set, a flash fault warning is reported. If both bits are set, a flash fault alarm is reported.

[0098] That is to say, through the above method, during the process of partition replacement, when there is still the last replaceable partition, a Flash fault warning is first issued, indicating that after using the current last replaceable partition to replace the partition, if the verification of the target file loading is executed again and still fails, the current Flash may have a hard failure problem, that is, the current Flash is suspected to have an abnormality that cannot be loaded normally after multiple replacements. In addition, when it is determined that the last replaceable partition also has an abnormal verification after the replacement is completed, it is determined that the current Flash has a hard failure fault. At this time, it is allowed to directly report the Flash fault alarm. When the management object finds the Flash fault alarm of the current single-board management controller, it means that the Flash cannot continue to be used normally after erasing to resolve the Flashbit error. When encountering a Flash particle hard failure problem, the management object needs to physically replace the flash memory space corresponding to the current single-board management controller, that is, use new Flash storage particles of the same model as the old Flash storage particles to replace and repair the single-board management controller, thereby maintaining the normal operation of the single-board management controller as a whole.

[0099] Obviously, the embodiments described above are only part of the embodiments of the present application, rather than all the embodiments. In order to better understand the above data block verification method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application. Optionally:

[0100] An optional embodiment of the present application provides a writing software for BMC configuration partition bad block detection, automatic replacement, and Flash fault alarm. FIG5 is a schematic diagram of an optional BMCConf partition bad block detection and automatic replacement software process according to an embodiment of the present application, including the following process:

[0101] It should be noted that in actual applications, it is necessary to calculate the information content as shown in Table 1 based on the actual situation of the actual project, and write the Conf partition address mapping configuration file corresponding to Table 1 into the mainboard E2PROM during the single board production and processing stage.

[0102] Step S504: During the MTD device loading phase started by the BMC, the "Conf partition address mapping configuration file" is searched to determine the enable flag, damage flag, and use flag. If the partition is enabled and not damaged, the available partition is found, and the Flash address corresponding to the partition is loaded into the Flash start address and end address members in the MTD device data structure.

[0103] Step S506: Continue booting until the Conf partition file system is loaded. First, verify the Conf partition. If the verification succeeds, load the Conf partition file system. If the verification fails, determine whether the partition is already in use. If not, write the Conf file in the on-chip RAM to the new Conf partition, and set the "Use Flag" of the corresponding Conf partition in the "Conf Partition Address Mapping Configuration File" to "True". If there is no Conf file in the on-chip RAM, write the new Conf partition using the initial Conf file in the BMC-Image. If it is already in use, update the "Damage Flag" of the corresponding Conf partition in the "Conf Partition Address Mapping Configuration File" to "True". And set the "Enable Flag" of the next partition to "Enable".

[0104] Step S508: Before starting the next Conf partition, a partition replacement log is recorded. A check is then made to determine whether this is the last Conf partition. If so, a Flash failure warning is recorded. The BMC is then reset, and S504 is repeated.

[0105] Step S510: If no available Conf partition is found, a Conf partition Flash failure is recorded, loading of the Conf partition is skipped, and the BMC is started continuously.

[0106] It should be noted that after the BMC is started, it checks whether the "Flash Fault Warning" and "Flash Fault" flags are set. If the "Flash Fault Warning" flag is set, a Flash Fault Warning flag is reported. If both flags are set, a Flash Fault Alarm flag is reported.

[0107] Step S512: After the BMC is started, if a customer modifies the Conf partition configuration during operation, the modification is first written to the on-chip RAM and then written to the Conf partition. As shown in Figure 6, Figure 6 is a flow chart of an optional BMCConf file writing software according to an embodiment of the present application.

[0108] It should be noted that the on-chip RAM of the BMC chip is powered by an external button battery, which is independent of the overall system power supply. The above process can detect and find the next new partition if a bad block in the Conf partition occurs. Furthermore, through early warning and alarms of Conf partition Flash failures, abnormal usage warnings can be provided in advance.

[0109] In summary, the above optional implementation method ensures that the customer's configuration is always online and will not be lost due to damage to some Flash particles. It also avoids the problem of customers repeatedly modifying the Conf partition of the Flash area, which may cause the Flash particles in the Conf partition to fail and cause the board to return, thus saving product maintenance costs. In addition, if a software bug causes excessive use of a certain Conf partition and damages the Flash particles, the above implementation method can ensure that the customer's configuration is not lost while promptly discovering the problem through inspection logs. This avoids the board returning due to hardware problems triggered by software bugs.

[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a non-volatile readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the method of each embodiment of the present application.

[0111] FIG7 is a structural block diagram of a data block verification device according to an embodiment of the present application; as shown in FIG7 , the device includes:

[0112] The first determining module 72 is configured to determine space partition information corresponding to the flash memory space associated with the board management controller when the board management controller loads the target file corresponding to the configuration partition;

[0113] A second determining module 74 is configured to determine a first partition in the flash memory space for storing the target file according to the space division information;

[0114] The verification module 76 is configured to verify the data blocks in the first partition using the file system format of the target file to obtain a first verification result.

[0115] Through the above-mentioned device, when the single-board management controller loads the target file corresponding to the configuration partition, the space division information corresponding to the flash memory space associated with the single-board management controller is determined; the first partition in the flash memory space for storing the target file is determined according to the space division information; the data block in the first partition is verified using the file system format of the target file to obtain a first verification result, and then before the single-board management controller loads the target file corresponding to the configuration partition, the file system format of the target file can be used to verify different partitions in the flash memory space. By verifying the corresponding storage partition before writing the target file, the bad block status of the partition can be determined in advance, thereby improving the detection efficiency of software bugs that cause excessive use of a partition and damage to the Flash particles. Therefore, it can solve the problem in the related technology that the exception handling of the configuration partition is slow and the processing efficiency is low when the Flash particles fail hard each time the BMC is upgraded or restarted, thereby saving the maintenance cost of the single-board management controller and avoiding the return of the board due to hardware problems triggered by software bugs.

[0116] In an exemplary embodiment, the above-mentioned device also includes an indication module, which is configured to use the file system format of the target file to verify the data blocks in the first partition. After obtaining a first verification result, if the first verification result indicates that the data blocks in the first partition pass the verification, it is determined to continue loading the target file into the first partition; if the first verification result indicates that the data blocks in the first partition fail the verification, a first mark is added to the first partition to prohibit loading the target file.

[0117] In an exemplary embodiment, the above-mentioned indication module also includes: a configuration unit, which is configured to add a first mark prohibiting the loading of the target file to the first partition when the first verification result indicates that the data block in the first partition has not passed the verification, and then read the mapping configuration file corresponding to the first partition for indicating the partition address; determine the partition numbers of multiple partitions currently started in the flash memory space according to the mapping configuration file; and configure the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, wherein the second partition has the same number of data blocks as the first partition.

[0118] In an exemplary embodiment, the above-mentioned indication module also includes: a first acquisition unit, which is configured to determine the read-only memory associated with the single board management controller before reading the mapping configuration file corresponding to the first partition for indicating the partition address; obtain a preset mapping configuration file corresponding to the flash memory space associated with the single board management controller; and store the preset mapping configuration file on the read-only memory.

[0119] In an exemplary embodiment, the above-mentioned indication module also includes: a reset unit, which is configured to configure the next partition adjacent to the first partition as the second partition for loading the target file according to the partition number, and then add a second mark to the second partition; when it is determined that the addition of the second mark is completed, a reset instruction is sent to the single board management controller, wherein the reset instruction is used to instruct the single board management controller to reopen the loading of the target file.

[0120] In an exemplary embodiment, the above-mentioned instruction module is further configured to obtain a first type of configuration file in a random access memory included in the board management controller; and determine the first type of configuration file as a target file to be loaded into the first partition.

[0121] In an exemplary embodiment, the above-mentioned indication module also includes: a second acquisition unit, which is configured to obtain the first type of configuration file in the random access memory contained in the single board management controller before obtaining it, and when it is determined that no configuration file exists in the random access memory, obtain the image file corresponding to the single board management controller; and determine the initial configuration file corresponding to the image file as the target file to be loaded into the first partition.

[0122] In an exemplary embodiment, the above-mentioned device also includes: a modification module, which is configured to obtain modification information sent by the target object to the single-board management controller before the single-board management controller loads the target file corresponding to the configuration partition; determine the modification content corresponding to the target file based on the modification information; write the modification content into the storage space corresponding to the random access memory contained in the single-board management controller, update the first type of configuration file already existing in the storage space, and obtain a second type of configuration file; perform a loading operation on the second type of configuration file, wherein the loading operation is configured to indicate that the second configuration file in the random access memory is loaded into the flash memory space.

[0123] In an exemplary embodiment, the configuration unit is further configured to update the second partition to a storage partition corresponding to the target file to be loaded by the first partition; and upon completion of the update, generate a target log for replacing the second partition with the first partition.

[0124] In an exemplary embodiment, the above-mentioned indication module also includes: an early warning unit, which is configured to configure the next partition adjacent to the first partition as the second partition for loading the target file according to the partition number, and then identify whether the second partition is the last partition in the flash memory space; when it is determined that the second partition is the last partition, generate an early warning log of the flash memory space, wherein the early warning log is used to indicate that the partition in the flash memory space cannot be replaced.

[0125] In an exemplary embodiment, the above-mentioned early warning unit also includes: a verification sub-unit, which is configured to, after determining that the second partition is the last partition, use the file system format of the target file to verify the data blocks in the second partition to obtain a second verification result; and determine whether to skip loading the target file during the startup process of the single-board management controller based on the second verification result.

[0126] In an exemplary embodiment, the above-mentioned verification sub-unit is also configured to determine to continue loading the target file into the second partition when the second verification result indicates that the data block in the second partition has passed the verification; and to instruct the single board management controller to skip loading the target file during the startup process when the second verification result indicates that the data block in the second partition has not passed the verification.

[0127] In an exemplary embodiment, the above-mentioned early warning unit also includes: a fault unit, which is configured to instruct the single board management controller to skip loading the target file during the startup process, and then obtain the startup information of the single board management controller; when it is determined that the single board management controller has completed the startup based on the startup information, it is determined to generate a fault log indicating that there is a hardware fault in the flash memory space associated with the single board management controller.

[0128] In an exemplary embodiment, the above-mentioned device also includes: a prompt module, which is configured to identify all logs generated by the single-board management controller during the entire startup process; when there are both warning logs and fault logs in all logs, a fault prompt information is sent to the management object of the single-board management controller, wherein the fault prompt information is used to instruct the management object to physically replace the flash memory space corresponding to the single-board management controller.

[0129] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0130] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are optional embodiments, and the actions and modules involved are not necessarily required for this application.

[0131] An embodiment of the present application further provides a non-volatile readable storage medium, which includes a stored program, wherein the program executes any of the above methods when running.

[0132] Optionally, in this embodiment, the non-volatile readable storage medium may be configured to store program codes for executing the following steps:

[0133] S1, when the board management controller loads a target file corresponding to a configuration partition, determining space partition information corresponding to a flash memory space associated with the board management controller;

[0134] S2, determining a first partition in the flash memory space for storing the target file according to the space division information;

[0135] S3: Verify the data blocks in the first partition using the file system format of the target file to obtain a first verification result.

[0136] In an exemplary embodiment, the non-volatile readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0137] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.

[0138] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0139] Fig. 8 schematically shows a computer system structure block diagram for realizing the electronic equipment of embodiment of the present application.As shown in Figure 8, computer system 800 includes central processing unit 801 (Central Processing Unit, CPU), which can perform various appropriate actions and processes according to the program stored in read-only memory 802 (Read-Only Memory, ROM) or the program loaded into random access memory 803 (Random Access Memory, RAM) from storage part 808. In random access memory 803, various programs and data required for system operation are also stored. Central processing unit 801, read-only memory 802 and random access memory 803 are connected to each other through bus 804. Input / output interface 805 (Input / Output interface, i.e., I / O interface) is also connected to bus 804.

[0140] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a local area network card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that a computer program read therefrom can be installed into the storage section 808 as needed.

[0141] In particular, according to an embodiment of the present application, the processes described in the various method flow charts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code configured to execute the methods shown in the flow charts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from a removable medium 811. When the computer program is executed by the central processing unit 801, the various functions defined in the system of the embodiment of the present application are executed.

[0142] It should be noted that the computer system 800 of the electronic device shown in FIG8 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0143] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0144] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.

[0145] Obviously, those skilled in the art should understand that the various modules or steps of the above-mentioned embodiments of the present application can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented using program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0146] The above are merely optional embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application may be modified and varied in various ways. Any modifications, equivalent replacements, improvements, etc. made within the principles of the embodiments of the present application shall be included in the scope of protection of the embodiments of the present application.

Claims

1. A method for verifying data blocks, characterized in that, Including: When the target file corresponding to the configuration partition is loaded by the single-board management controller, determining the space division information corresponding to the flash memory space associated with the single-board management controller; Determining a first partition in the flash memory space for storing the target file according to the space division information; Using the file system format of the target file to check the data blocks in the first partition to obtain a first check result.

2. The data block verification method according to claim 1, characterized in that After using the file system format of the target file to check the data blocks in the first partition to obtain a first check result, the method further includes: When the first check result indicates that the data blocks in the first partition pass the check, determining to continuously load the target file into the first partition; When the first check result indicates that the data blocks in the first partition do not pass the check, adding a first mark to the first partition to prohibit loading the target file.

3. The verification method for data blocks according to claim 2, characterized in that, After adding a first mark to the first partition to prohibit loading the target file when the first check result indicates that the data blocks in the first partition do not pass the check, the method further includes: Reading a mapping configuration file corresponding to the first partition for indicating the partition address; Determining the partition numbers of multiple currently started partitions in the flash memory space according to the mapping configuration file; Configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition numbers, where the second partition has the same number of data blocks as the first partition.

4. The verification method for data blocks according to claim 3, characterized in that, Before reading the mapping configuration file corresponding to the first partition for indicating the partition address, the method further includes: Determining a read-only memory associated with the single-board management controller; Obtaining a preset mapping configuration file corresponding to the flash memory space associated with the single-board management controller; Storing the preset mapping configuration file on the read-only memory.

5. The verification method of the data block according to claim 3, wherein After configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition numbers, the method further includes: Adding a second mark to the second partition; When it is determined that the addition of the second mark is completed, sending a reset instruction to the single-board management controller, where the reset instruction is used to instruct the single-board management controller to restart loading the target file.

6. The verification method of the data block according to claim 2, wherein When the first check result indicates that the data blocks in the first partition pass the check, determining to continuously load the target file into the first partition includes: Obtaining a first type of configuration file in the random access memory included in the single-board management controller; Determining the first type of configuration file as the target file to be loaded into the first partition.

7. The data block verification method according to claim 6, characterized in that, Before obtaining the first type of configuration file in the random access memory included in the single-board management controller, the method further includes: When it is determined that there is no configuration file in the random access memory, obtaining an image file corresponding to the single-board management controller; Determining the initial configuration file corresponding to the image file as the target file to be loaded into the first partition.

8. The verification method of the data block according to claim 1, characterized in that, Before the target file corresponding to the configuration partition is loaded by the single-board management controller, the method further includes: Obtaining modification information sent by a target object to the single-board management controller; Determining the modification content corresponding to the target file according to the modification information; Writing the modification content into the storage space corresponding to the random access memory included in the single-board management controller, and updating the first type of configuration file existing in the storage space to obtain a second type of configuration file; Performing a loading operation on the second type of configuration file, where the loading operation is used to indicate loading the second configuration file in the random access memory into the flash space.

9. The data block verification method according to claim 3, configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, includes: Updating the second partition to the storage partition corresponding to the target file to be loaded by the first partition; Generating a target log for replacing the second partition with the first partition when the update is completed.

10. The verification method of the data block according to claim 3, characterized in that, After configuring the next partition adjacent to the first partition as a second partition for loading the target file according to the partition number, the method further includes: Identifying whether the second partition is the last partition in the flash space; Generating a warning log for the flash space when it is determined that the second partition is the last partition, where the warning log is used to indicate that the partitions in the flash space cannot be replaced.

11. The verification method for data blocks according to claim 10, wherein After determining that the second partition is the last partition, the method further includes: Verifying the data blocks in the second partition using the file system format of the target file to obtain a second verification result; Determining whether to skip loading the target file during the startup process of the single-board management controller according to the second verification result.

12. The verification method for data blocks according to claim 11, characterized in that, Determining whether to skip loading the target file during the startup process of the single-board management controller according to the second verification result, includes: Determining to continuously load the target file into The second partition when the second verification result indicates that the data blocks in the second partition pass the verification; Indicating to skip loading the target file during the startup process of the single-board management controller when the second verification result indicates that the data blocks in the second partition do not pass the verification.

13. The verification method for data blocks according to claim 12, characterized in that, After indicating to skip loading the target file during the startup process of the single-board management controller, the method further includes: Obtaining the startup information of the single-board management controller; Determining to generate a fault log indicating that there is a hardware fault in the flash space associated with the single-board management controller when it is determined that the single-board management controller has completed startup according to the startup information.

14. The verification method for data blocks according to any one of claims 10 to 13, characterized in that The method further includes: Identifying all the logs generated by the single-board management controller during the entire startup process; When the warning log and the fault log exist simultaneously in all the logs, a fault prompt message is sent to the management object of the board management controller, where the fault prompt message is used to instruct the management object to physically replace the flash memory space corresponding to the board management controller.

15. The verification method for data blocks according to claim 1, wherein The size of the first partition corresponds to the partition size required for the data of the target file.

16. The verification method of the data block according to claim 1, characterized in that, The first partition is composed of sub - partitions divided from multiple flash memory spaces.

17. The data block verification method according to claim 1, characterized in that, The method further includes: Check whether the flash memory fault warning and the flash memory fault are set; If the flash memory fault warning is set, report the flash memory fault warning. If both the flash memory fault warning and the flash memory fault are set, report the flash memory fault alarm.

18. A verification device for data blocks, characterized in that Including: A first determination module, configured to determine the space division information corresponding to the flash memory space associated with the board management controller when the board management controller loads the target file corresponding to the configuration partition; A second determination module, configured to determine a first partition in the flash memory space for storing the target file according to the space division information; A verification module, configured to verify the data blocks in the first partition using the file system format of the target file to obtain a first verification result.

19. A non-volatile readable storage medium, characterized in that, The non - volatile readable storage medium stores a computer program, where the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 17.

20. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 17.

Citation Information

Patent Citations

  • Method and device for reducing service interruption time

    CN101106441A

  • Data file updating storage method

    CN101290628A

  • Binary programming format loading method and system under embedded system

    CN113590227A

  • Electronic equipment management method and device, electronic equipment and storage medium

    CN114780019A

  • Data block verification method and device, storage medium and electronic equipment

    CN117472291A