WO2022179377A1 - 一种raid 5校验值的更新方法、装置和介质 - Google Patents

一种raid 5校验值的更新方法、装置和介质 Download PDF

Info

Publication number
WO2022179377A1
WO2022179377A1 PCT/CN2022/074066 CN2022074066W WO2022179377A1 WO 2022179377 A1 WO2022179377 A1 WO 2022179377A1 CN 2022074066 W CN2022074066 W CN 2022074066W WO 2022179377 A1 WO2022179377 A1 WO 2022179377A1
Authority
WO
WIPO (PCT)
Prior art keywords
check value
data
updated
strip
new
Prior art date
Application number
PCT/CN2022/074066
Other languages
English (en)
French (fr)
Inventor
万翔
Original Assignee
浪潮电子信息产业股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浪潮电子信息产业股份有限公司 filed Critical 浪潮电子信息产业股份有限公司
Priority to US18/272,144 priority Critical patent/US20240143495A1/en
Publication of WO2022179377A1 publication Critical patent/WO2022179377A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1076Parity data used in redundant arrays of independent storages, e.g. in RAID systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the technical field of storage devices, and in particular, to a method, device and computer-readable storage medium for updating a RAID 5 check value.
  • RAID 5 is a storage solution that takes into account storage performance, data security and storage cost.
  • RAID 5 can be understood as a compromise between RAID 0 and RAID 1.
  • RAID 5 can provide data security for the system.
  • RAID 5 has a data read speed similar to that of RAID 0, but with one more parity information, the speed of writing data is slightly slower than writing to a single disk.
  • RAID 5 has higher disk space utilization than RAID 1, and the storage cost is relatively low. It is a solution that is widely used at present.
  • a RAID 5 array often contains multiple data stripes, each data strip has its corresponding data block state vector table, and the data block state vector table records the state value of each data block and the data stripe.
  • Check value When a data block in the data strip is abnormal, according to the check value and the status value of the remaining data blocks, the original state value corresponding to the abnormal data block can be determined, so as to determine whether the abnormal data block needs to be processed. reconstruction.
  • the check value is an important basis for performing data stripe recovery.
  • the inventor realized that the determination of the check value in the traditional way is to perform an exclusive OR operation on the state values of all the data blocks in the data strip, and use the operation result as the check value of the data strip. After each read and write operation is performed on a data block, it is necessary to re-read the status values of all data blocks in the data stripe to determine the check value. Update efficiency is low.
  • the embodiment of the present application provides a method for updating a RAID 5 check value, including:
  • the new state value of the data block to be updated is processed to obtain a new check value of the data strip.
  • the rule base includes a first check value update rule corresponding to zero proportion and the data stripe is not used; and a second check value update rule corresponding to zero proportion and the data stripe being used rule; the third check value update rule corresponding to when the proportion is not zero and the proportion meets the preset conditions; the fourth check value update rule corresponding to the proportion not zero and the proportion does not meet the preset conditions;
  • the first check value update rule is to determine the new check value of the data strip according to the new state values of all data blocks to be updated;
  • the second check value update rule is to determine the new check value of the data strip according to the original check value and The new status values of all the data blocks to be updated are determined, and the new check value of the data strip is determined;
  • the third check value update rule is based on the status values of the data blocks that do not need to be updated in the data strip and the new check values of all the data blocks to be updated.
  • the state value determines the new check value of the data strip;
  • the fourth check value update rule is based on the original check value of the data strip, the original state value of all data blocks to be updated, and the new state of all data blocks to be updated. value to determine the new check value of the data stripe.
  • querying the matching check value update rule from the established rule base includes:
  • the second check value update rule is obtained from the rule base
  • the fourth check value update rule is obtained from the rule base.
  • the check value update rule when the check value update rule is the first check value update rule, the check value update rule is used to process the new state value of the data block to be updated, so as to obtain a new check value of the data strip.
  • Values include:
  • the XOR operation is performed on the new state values of all the data blocks to be updated, and the operation result is used as the new check value of the data strip.
  • the check value update rule when the check value update rule is the second check value update rule, the check value update rule is used to process the new state value of the data block to be updated, so as to obtain a new check value of the data strip.
  • Values include:
  • the original check value and the new state values of all the data blocks to be updated are XORed, and the operation result is used as the new check value of the data strip.
  • the check value update rule when the check value update rule is the third check value update rule, the check value update rule is used to process the new state value of the data block to be updated, so as to obtain a new check value of the data strip.
  • Values include:
  • the XOR operation is performed on the state values of the data blocks that do not need to be updated in the data strip and the new state values of all the data blocks to be updated, and the operation result is used as the new check value of the data strip.
  • the check value update rule when the check value update rule is the fourth check value update rule, the check value update rule is used to process the new state value of the data block to be updated, so as to obtain a new check value of the data strip.
  • Values include:
  • the XOR operation is performed on the original check value of the data strip, the original state values of all the data blocks to be updated, and the new state values of all the data blocks to be updated, and the operation result is used as the new check value of the data strip.
  • the embodiment of the present application also provides a device for updating a RAID 5 check value, including an acquisition unit, a query unit, and a processing unit;
  • an acquisition unit for acquiring an update instruction of the data strip; wherein, the update instruction carries the new state value of the data block to be updated;
  • a query unit configured to query the matching check value update rule from the established rule base according to the proportion of all the data blocks to be updated in the data strip and the usage status of the data strip;
  • the processing unit is configured to process the new state value of the data block to be updated by using the check value update rule, so as to obtain a new check value of the data strip.
  • the rule base includes a first check value update rule corresponding to zero proportion and the data stripe is not used; and a second check value update rule corresponding to zero proportion and the data stripe being used rule; the third check value update rule corresponding to when the proportion is not zero and the proportion meets the preset conditions; the fourth check value update rule corresponding to the proportion not zero and the proportion does not meet the preset conditions;
  • the first check value update rule is to determine the new check value of the data strip according to the new state values of all data blocks to be updated;
  • the second check value update rule is to determine the new check value of the data strip according to the original check value and The new status values of all the data blocks to be updated are determined, and the new check value of the data strip is determined;
  • the third check value update rule is based on the status values of the data blocks that do not need to be updated in the data strip and the new check values of all the data blocks to be updated.
  • the state value determines the new check value of the data strip;
  • the fourth check value update rule is based on the original check value of the data strip, the original state value of all data blocks to be updated, and the new state of all data blocks to be updated. value to determine the new check value of the data stripe.
  • the query unit includes a first acquisition subunit, a second acquisition subunit, a statistics subunit, a third acquisition subunit, and a fourth acquisition subunit;
  • the first acquisition subunit is used to acquire the first check value update rule from the rule base when all the data blocks to be updated are empty in the data strip and the data strip is not used;
  • the second acquisition subunit is used to acquire the second check value update rule from the rule base when all the data blocks to be updated are empty in the data strip and the data strip has been used;
  • the statistics subunit is used to count the first value of the data block to be updated that is empty in the data strip and the data block to be updated in the data strip when all the data blocks to be updated are not empty in the data strip. non-empty second value;
  • the third obtaining subunit is used to obtain the third check value update rule from the rule base when the first value is less than or equal to the second value;
  • the fourth obtaining subunit is used to obtain the fourth check value update rule from the rule base when the first value is greater than the second value.
  • the processing unit when the check value update rule is the first check value update rule, the processing unit is configured to perform an XOR operation on the new state values of all the data blocks to be updated, and use the operation result as the New check value.
  • the processing unit when the check value update rule is the second check value update rule, the processing unit is used to obtain the original check value of the data strip; The state value is XORed, and the result of the operation is used as the new check value of the data strip.
  • the processing unit when the check value update rule is the third check value update rule, is configured to obtain the status value of the data block that does not need to be updated in the data strip; The state value of the block is XORed with the new state values of all the data blocks to be updated, and the operation result is used as the new check value of the data strip.
  • the processing unit is configured to obtain the original check value of the data strip and the original state values of all data blocks to be updated;
  • the original check value of the strip, the original state values of all the data blocks to be updated, and the new state values of all the data blocks to be updated are XORed, and the operation result is used as the new check value of the data strip.
  • Embodiments of the present application also provide an apparatus for updating a RAID 5 check value, including a memory and one or more processors, where computer-readable instructions are stored in the memory, and the computer-readable instructions are executed by the one or more processors.
  • the processor executes the one or more processors are caused to execute the steps of any one of the above-mentioned methods for updating the RAID 5 check value.
  • the embodiments of the present application further provide one or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more A plurality of processors execute the steps of any one of the foregoing methods for updating a RAID 5 check value.
  • FIG. 1 is an application scenario diagram of a method for updating a RAID 5 check value provided in one or more embodiments of the present application
  • FIG. 2 is a flowchart of a method for updating a RAID 5 check value provided by this application according to one or more embodiments;
  • FIG. 3 is a schematic structural diagram of a device for updating a RAID 5 check value provided by the present application according to one or more embodiments;
  • FIG. 4 is a schematic structural diagram of an apparatus for updating a RAID 5 check value provided by the present application according to one or more embodiments.
  • the file processing method provided by this application can be applied to the application environment shown in FIG. 1 .
  • the terminal 102a communicates with the server 104a through a network.
  • the terminal 102a can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server 104a can be implemented by an independent server or a server cluster composed of multiple servers.
  • the terminal 102a obtains the update instruction of the data strip; wherein, the update instruction carries the new state value of the data block to be updated, and is sent to the server 104a.
  • the server 104a receives the update instruction of the data strip, it can The proportion of the data block to be updated in the data strip and the usage status of the data strip, query the matching check value update rule from the established rule base; and use the check value update rule to obtain the new state of the data block to be updated value is processed to obtain a new check value for the data stripe. Further, the server 104a may return the new check value of the data strip to the terminal 102a.
  • the terminal 102a obtains an update instruction of the data strip, wherein the update instruction carries the new state value of the data block to be updated, according to the proportion of all the data blocks to be updated in the data strip and the size of the data strip.
  • the terminal 102a uses the state, query the matching check value update rule from the established rule base, and use the check value update rule to process the new state value of the data block to be updated to obtain the new check value of the data strip.
  • FIG. 2 is a flowchart of a method for updating a RAID 5 check value provided by an embodiment of the present application, and is described by taking the method applied to the terminal or server in FIG. 1 as an example, and the method includes:
  • the update instruction carries the new state value of the data block to be updated.
  • a data stripe can contain multiple data blocks.
  • the status value can be used to represent whether there is data stored in the data block.
  • numbers “1” and “0” are used as status values. For example, a number “1” indicates that data is stored in the data block, and a number “0" indicates that the data block does not store data.
  • the proportion of the data block to be updated in the data stripe is different, and the usage status of the data stripe is different, and the corresponding check value update method will be different.
  • the different proportions of the data blocks to be updated in the data stripe and the corresponding check value update modes of the data stripes under different usage states can be summarized in the form of rules to establish a rule base.
  • the rule base may include a first check value update rule corresponding to zero proportion and the data stripe not being used; a second check value update rule corresponding to zero proportion and the data stripe being used ; the third check value update rule corresponding to when the proportion is not zero and the proportion meets the preset condition; the fourth check value update rule corresponding to when the proportion is not zero and the proportion does not meet the preset condition.
  • the ratio can be set according to the number of data blocks that already store data in the data strip among the data blocks to be updated. If the proportion is zero, it means that the data block to be updated does not store data in the data stripe. If the ratio is not zero, it means that at least one data block that needs to be updated has already stored data in the data stripe.
  • Whether the proportion satisfies the preset condition may be set according to the ratio of the number of empty data blocks to be updated in the data strip to the number of non-empty data blocks to be updated in the data strip. For example, when the number of data blocks to be updated that are empty in the data stripe is less than or equal to the number of non-empty data blocks to be updated in the data stripe, the third check value update rule can be called; When the number of empty blocks in the data stripe is greater than the number of non-empty data blocks to be updated in the data stripe, the fourth check value update rule is invoked.
  • the first check value update rule is to determine the new check value of the data strip according to the new state values of all data blocks to be updated;
  • the second check value update rule is to determine the new check value of the data strip according to the original check value and The new status values of all the data blocks to be updated are determined, and the new check value of the data strip is determined;
  • the third check value update rule is based on the status values of the data blocks that do not need to be updated in the data strip and the new check values of all the data blocks to be updated.
  • the state value determines the new check value of the data strip;
  • the fourth check value update rule is based on the original check value of the data strip, the original state value of all data blocks to be updated, and the new state of all data blocks to be updated. value to determine the new check value of the data stripe.
  • the update instruction carrying the new state value of the data block to be updated when the update instruction carrying the new state value of the data block to be updated is obtained, it can be determined whether all the data blocks to be updated are empty in the data strip. If all the data blocks to be updated are empty in the data strip, it means that the data blocks to be updated do not store data in the data strip, that is, the proportion is zero. At this time, it can be further determined whether the data strip is used.
  • the first check value update rule can be obtained from the rule base. Specifically, the terminal or the server judges whether all the data blocks to be updated are empty in the data strip, and judges whether the data strip is used, and judges that all the data blocks to be updated are empty in the data strip, and the data strip If it is not used, the first check value update rule is obtained from the rule base based on the judgment result.
  • the second check value update rule is acquired from the rule base. Specifically, the terminal or the server judges whether all the data blocks to be updated are empty in the data strip, and judges whether the data strip is used, and judges that all the data blocks to be updated are empty in the data strip, and the data strip has been used, and the second check value update rule is obtained from the rule base based on the judgment result.
  • the terminal or server determines whether all the data blocks to be updated are empty in the data strip, and determines that all the data blocks to be updated are not empty in the data strip. The first value that is empty in the stripe and the second value that is not empty in the data stripe for the block to be updated.
  • the third check value update rule is obtained from the rule base; if the first value is greater than the second value, the fourth check value update rule is obtained from the rule base rule.
  • the new state values of all the data blocks to be updated can be XORed, and the result of the operation can be used as a data bar.
  • the new check value of the belt can be used as a data bar.
  • the state values of these 6 data blocks are respectively represented by d 0 to d 5 ;
  • D i represents the new state value of the data block to be updated;
  • P 0 represents the original calibration of the data strip.
  • check value, P 0 ' represents the new check value of the data strip.
  • the check value update rule is the second check value update rule
  • the original check value of the data strip can be obtained; the original check value and the new state values of all the data blocks to be updated are XORed, and the result of the operation is XORed. as the new check value for the data stripe.
  • the check value update rule is the third check value update rule
  • the status values of the data blocks in the data strip that do not need to be updated can be obtained; the status values of the data blocks that do not need to be updated in the data strip and all the data blocks to be updated XOR operation is performed on the new state value of the data strip, and the operation result is used as the new check value of the data strip.
  • the new state values of the data blocks to be updated currently are D 0 and D 1 , it means that the data blocks d 0 and d 1 need to be updated to D 0 and D 1 .
  • the status value of the third data block is d 2 , and statistics can be The number of data blocks to be updated that are empty in the data strip, represented by rcw; the number of non-empty data blocks to be updated in the data strip is counted, represented by rmw. At this time, rcw ⁇ rmw, you can follow the Calculate the new check value.
  • the check value update rule is the fourth check value update rule
  • the original check value of the data strip and the original state values of all data blocks to be updated can be obtained;
  • the original state value of the data block and the new state value of all the data blocks to be updated are XORed, and the operation result is used as the new check value of the data strip.
  • the update instruction of the data strip is obtained; wherein, the update instruction carries the new state value of the data block to be updated.
  • the proportion of the data blocks to be updated in the data stripes is different, and the usage status of the data stripes is different, and the corresponding update methods of the check values are different.
  • the data blocks to be updated can be stored in the data stripes.
  • the different proportions of data stripes and the corresponding check value update methods of the data strips in different usage states are summarized in the form of rules to establish a rule base.
  • the matching check value update rules can be queried from the established rule base; using the check value update rules, the data blocks to be updated can be updated.
  • the new status value is processed to obtain a new check value for the data stripe.
  • the present application relies on the check value update rule to process the new state value of the data block to be updated, so that the data strip can be processed.
  • the present application reduces the calculation amount of the update of the check value, and improves the efficiency of the update of the check value.
  • FIG. 3 is a schematic structural diagram of an apparatus for updating a RAID 5 check value provided by an embodiment of the present application, including an acquisition unit 21, a query unit 22 and a processing unit 23;
  • the acquisition unit 21 is used to acquire the update instruction of the data strip; wherein, the update instruction carries the new state value of the data block to be updated;
  • the query unit 22 is used to query the matching check value update rule from the established rule base according to the proportion of all the data blocks to be updated in the data strip and the usage status of the data strip;
  • the processing unit 23 is configured to process the new state value of the data block to be updated by using the check value update rule, so as to obtain a new check value of the data strip.
  • the rule base includes a first check value update rule corresponding to zero proportion and the data stripe not being used; a second check value update rule corresponding to zero proportion and the data stripe being used ; the third check value update rule corresponding to when the proportion is not zero and the proportion meets the preset conditions; the fourth check value update rule corresponding to the proportion not zero and the proportion does not meet the preset conditions;
  • the first check value update rule is to determine the new check value of the data strip according to the new state values of all data blocks to be updated;
  • the second check value update rule is to determine the new check value of the data strip according to the original check value and The new status values of all the data blocks to be updated are determined, and the new check value of the data strip is determined;
  • the third check value update rule is based on the status values of the data blocks that do not need to be updated in the data strip and the new check values of all the data blocks to be updated.
  • the state value determines the new check value of the data strip;
  • the fourth check value update rule is based on the original check value of the data strip, the original state value of all data blocks to be updated, and the new state of all data blocks to be updated. value to determine the new check value of the data stripe.
  • the query unit includes a first judgment subunit, a second judgment subunit, a first acquisition subunit, a second acquisition subunit, a statistics subunit, a third acquisition subunit, and a fourth acquisition subunit;
  • the first judgment subunit is used to judge whether all the data blocks to be updated are empty in the data strip
  • the second judgment subunit is used for if all data blocks to be updated are empty in the data strip, then judge whether the data strip is used;
  • the first obtaining subunit is used to obtain the first check value update rule from the rule base if the data strip is not used;
  • the second obtaining subunit is used to obtain the second check value update rule from the rule base if the data strip has been used;
  • the statistics subunit is used to count the first value of the data block to be updated that is empty in the data strip and the data block to be updated in the data strip if all the data blocks to be updated are not empty in the data strip. non-empty second value;
  • the third obtaining subunit is used to obtain the third check value update rule from the rule base if the first value is less than or equal to the second value;
  • the fourth obtaining subunit is used to obtain the fourth check value update rule from the rule base if the first value is greater than the second value.
  • the processing unit is configured to perform an XOR operation on the new state values of all the data blocks to be updated, and use the operation result as a data bar The new check value of the belt.
  • the processing unit is configured to obtain the original check value of the data strip; XOR operation is performed on the new state value of the data strip, and the operation result is used as the new check value of the data strip.
  • the processing unit is configured to obtain the status value of the data block that does not need to be updated in the data strip;
  • the state value of the data block and the new state value of all the data blocks to be updated are XORed, and the operation result is used as the new check value of the data strip.
  • the processing unit is configured to obtain the original check value of the data strip and the original state values of all the data blocks to be updated;
  • the original check value of the data strip, the original state values of all the data blocks to be updated, and the new state values of all the data blocks to be updated are XORed, and the operation result is used as the new check value of the data strip.
  • the update instruction of the data strip is obtained; wherein, the update instruction carries the new state value of the data block to be updated.
  • the proportion of the data blocks to be updated in the data stripes is different, and the usage status of the data stripes is different, and the corresponding update methods of the check values are different.
  • the data blocks to be updated can be stored in the data stripes.
  • the different proportions of data stripes and the corresponding check value update methods of the data strips in different usage states are summarized in the form of rules to establish a rule base.
  • the matching check value update rules can be queried from the established rule base; using the check value update rules, the data blocks to be updated can be updated.
  • the new status value is processed to obtain a new check value for the data stripe.
  • the present application relies on the check value update rule to process the new state value of the data block to be updated, so that the data strip can be processed.
  • the present application reduces the calculation amount of the update of the check value, and improves the efficiency of the update of the check value.
  • the device 30 for updating a RAID 5 check value may be computer equipment, and the computer equipment may be a terminal or a server.
  • the updating device 30 of the RAID 5 check value includes:
  • memory 31 for storing computer readable instructions
  • One or more processors 32 for executing the computer-readable instructions stored in the memory, when the computer-readable instructions are executed by the processor, the steps of the method for updating the RAID 5 check value as described in any of the above-mentioned embodiments can be realized .
  • Embodiments of the present application further provide a non-volatile readable storage medium, where computer readable instructions are stored in the non-volatile readable storage medium, and the computer program of the computer readable instructions is executed by one or more processors At the same time, the steps of the method for updating the RAID 5 check value as described in any of the above-mentioned embodiments can be realized.
  • Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer.
  • the computer-readable instructions when executed, may include the processes of the foregoing method embodiments.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Road (Synchlink) DRAM
  • SLDRAM synchronous chain Road (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Abstract

本申请实施例公开了一种RAID 5校验值的更新方法、装置和介质,获取数据条带的更新指令;更新指令中携带有待更新数据块的新状态值。待更新数据块在数据条带中的占比不同,以及数据条带的使用状态不同其对应的校验值更新方式有所差异。依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,可以从建立的规则库中查询相匹配的校验值更新规则;利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。

Description

一种RAID 5校验值的更新方法、装置和介质
相关申请的交叉引用
本申请要求于2021年02月25日提交中国专利局,申请号为202110211375.2,申请名称为“一种RAID 5校验值的更新方法、装置和介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及存储设备技术领域,特别是涉及一种RAID 5校验值的更新方法、装置和计算机可读存储介质。
背景技术
RAID 5是一种存储性能、数据安全和存储成本兼顾的存储解决方案。RAID 5可以理解为是RAID 0和RAID 1的折中方案。RAID 5可以为系统提供数据安全保障。RAID 5具有和RAID 0相近似的数据读取速度,只是多了一个奇偶校验信息,写入数据的速度比对单个磁盘进行写入操作稍慢。同时由于多个数据对应一个奇偶校验信息,RAID 5的磁盘空间利用率要比RAID 1高,存储成本相对较低,是目前运用较多的一种解决方案。
一个RAID 5阵列往往包含有多个数据条带,每个数据条带有其对应的数据块状态向量表,在该数据块状态向量表中记录有各数据块的状态值,以及数据条带的校验值。当数据条带中某个数据块出现异常时,依据校验值以及剩余数据块的状态值,可以确定出出现异常的数据块原本对应的状态值,从而决定是否需要对出现异常的数据块进行重建。校验值是执行数据条带恢复的重要依据。
发明人意识到,传统方式中对于校验值的确定是将数据条带中所有数据块的状态值进行异或运算,将运算结果作为数据条带的校验值。每次对数据块执行读写操作后,都需要重新读取数据条带中所有数据块的状态值,从而确定出校验值,更新校验值的计算量往往较大,导致校验值的更新效率较低。
可见,如何提升RAID 5校验值的更新效率,是本领域技术人员需要解决的问题。
发明内容
本申请实施例提供一种RAID 5校验值的更新方法,包括:
获取数据条带的更新指令;其中,更新指令中携带有待更新数据块的新状态值;
依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则;和
利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。
在其中一个实施例中,规则库包括占比为零且数据条带未使用时对应的第一校验值更新规则;占比为零且数据条带已使用时对应的第二校验值更新规则;占比不为零且占比满足预设条件时对应的第三校验值更新规则;占比不为零且占比不满足预设条件时对应的第四校验值更新规则;
其中,第一校验值更新规则为依据所有待更新数据块的新状态值,确定出数据条带的新校验值;第二校验值更新规则为依据数据条带的原校验值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第三校验值更新规则为依据数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第四校验值更新规则为依据数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值。
在其中一个实施例中,依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则包括:
在所有待更新数据块在数据条带中均为空,且数据条带未被使用时,从规则库中获取第一校验值更新规则;
在所有待更新数据块在数据条带中均为空,且数据条带已被使用时,则从规则库中获取第二校验值更新规则;
在所有待更新数据块在数据条带中不均为空时,统计待更新数据块在数据条带中为空的第一个数值以及待更新数据块在数据条带中非空的第二个数值;
在第一个数值小于或等于第二个数值时,从规则库中获取第三校验值更新规则;和
在第一个数值大于第二个数值时,从规则库中获取第四校验值更新规则。
在其中一个实施例中,在校验值更新规则为第一校验值更新规则时,利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值包括:
将所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在其中一个实施例中,在校验值更新规则为第二校验值更新规则时,利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值包括:
获取数据条带的原校验值;和
将原校验值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在其中一个实施例中,在校验值更新规则为第三校验值更新规则时,利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值包括:
获取数据条带中无需更新的数据块的状态值;和
对数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在其中一个实施例中,在校验值更新规则为第四校验值更新规则时,利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值包括:
获取数据条带的原校验值以及所有待更新数据块的原状态值;和
对数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
本申请实施例还提供了一种RAID 5校验值的更新装置,包括获取单元、查询单元和处理单元;
获取单元,用于获取数据条带的更新指令;其中,更新指令中携带有待更新数据块的新状态值;
查询单元,用于依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则;和
处理单元,用于利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。
在其中一个实施例中,规则库包括占比为零且数据条带未使用时对应的第一校验值更新规则;占比为零且数据条带已使用时对应的第二校验值更新规则;占比不为零且占比满足预设条件时对应的第三校验值更新规则;占比不为零且占比不满足预设条件时对应的第四校验值更新规则;
其中,第一校验值更新规则为依据所有待更新数据块的新状态值,确定出数据条带的新校验值;第二校验值更新规则为依据数据条带的原校验值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第三校验值更新规则为依据数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第四校验值更新规则为依据数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值。
在其中一个实施例中,查询单元包括第一获取子单元、第二获取子单元、统计子单元、第三获取子单元和第四获取子单元;
第一获取子单元,用于在所有待更新数据块在数据条带中均为空,且数据条带未被使用时,从规则库中获取第一校验值更新规则;
第二获取子单元,用于在所有待更新数据块在数据条带中均为空,且数据条带已被使用时,从规则库中获取第二校验值更新规则;
统计子单元,用于在所有待更新数据块在数据条带中不均为空时,统计待更新数据块在数据条带中为空的第一个数值以及待更新数据块在数据条带中非空的第二个数值;
第三获取子单元,用于在第一个数值小于或等于第二个数值时,从规则库中获取第三校验值更新规则;
第四获取子单元,用于在第一个数值大于第二个数值时,从规则库中获取第四校验值更新规则。
在其中一个实施例中,在校验值更新规则为第一校验值更新规则时,处理单元用于将所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在其中一个实施例中,在校验值更新规则为第二校验值更新规则时,处理单元用于获取数据条带的原校验值;将原校验值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在其中一个实施例中,在校验值更新规则为第三校验值更新规则时,处理单元用于获取数据条带中无需更新的数据块的状态值;对数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在其中一个实施例中,在校验值更新规则为第四校验值更新规则时,处理单元用于获取数据条带的原校验值以及所有待更新数据块的原状态值;对数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
本申请实施例还提供了一种RAID 5校验值的更新装置,包括存储器及一个或多个处理器,存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行上述任意一项RAID 5校验值的更新方法的步骤。
本申请实施例最后还提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处 理器执行上述任意一项RAID 5校验值的更新方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请根据一个或多个实施例中提供的一种RAID 5校验值的更新方法的应用场景图;
图2为本申请根据一个或多个实施例提供的一种RAID 5校验值的更新方法的流程图;
图3为本申请根据一个或多个实施例提供的一种RAID 5校验值的更新装置的结构示意图;
图4为本申请根据一个或多个实施例提供的一种RAID 5校验值的更新装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。
本申请提供的文件处理方法,可以应用于如图1所示的应用环境中。其中,终端102a与服务器104a通过网络进行通信。终端102a可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104a可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
具体地,终端102a获取到数据条带的更新指令;其中,更新指令中携带有待更新数据块的新状态值,并发送至服务器104a,服务器104a接收到数据条带的更新指令后,可以依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,从建立的规则库 中查询相匹配的校验值更新规则;和利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。进一步地,服务器104a可以将数据条带的新校验值返回至终端102a。
在另一个实施例中,终端102a获取数据条带的更新指令,其中,更新指令中携带有待更新数据块的新状态值,依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则,和利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。
接下来,详细介绍本申请实施例所提供的一种RAID 5校验值的更新方法。图2为本申请实施例提供的一种RAID 5校验值的更新方法的流程图,以该方法应用于图1中的终端或服务器为例进行说明,该方法包括:
S101:获取数据条带的更新指令。
其中,更新指令中携带有待更新数据块的新状态值。
一个数据条带可以包含多个数据块。在实际应用中,可以采用状态值表征数据块中是否存储有数据。为了便于介绍,在本申请实施例中,采用数字“1”和“0”作为状态值,例如,数字“1”表示数据块中存储有数据,数字“0”表示数据块未存储数据。
S102:依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则。
待更新数据块在数据条带中的占比不同,以及数据条带的使用状态不同其对应的校验值更新方式会有所差异。在实际应用中,可以将待更新数据块在数据条带中的不同占比以及数据条带在不同使用状态下对应的校验值更新方式以规则的形式进行汇总,以建立规则库。
在实际应用中,规则库可以包括占比为零且数据条带未使用时对应的第一校验值更新规则;占比为零且数据条带已使用时对应的第二校验值更新规则;占比不为零且占比满足预设条件时对应的第三校验值更新规则;占比不为零且占比不满足预设条件时对应的第四校验值更新规则。
占比可以依据需要更新的数据块中已经在数据条带中存储有数据的数据块个数设置。占比为零,则说明需要更新的数据块在数据条带中并未存储数据。占比不为零,则说明需要更新的至少一个数据块在数据条带中已经存储了数据。
占比是否满足预设条件可以依据待更新数据块在数据条带中为空的个数与待更新数据块在数据条带中非空的个数的比值关系设置。例如,可以在待更新数据块在数据条带中为空的个数小于或等于待更新数据块在数据条带中非空的个数时,调用第三校验值更 新规则;在待更新数据块在数据条带中为空的个数大于待更新数据块在数据条带中非空的个数时,调用第四校验值更新规则。
其中,第一校验值更新规则为依据所有待更新数据块的新状态值,确定出数据条带的新校验值;第二校验值更新规则为依据数据条带的原校验值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第三校验值更新规则为依据数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第四校验值更新规则为依据数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值。
在具体实现中,当获取到携带有待更新数据块的新状态值的更新指令时,可以判断所有待更新数据块是否在数据条带中均为空。若所有待更新数据块在数据条带中均为空,则说明待更新数据块在数据条带中并未存储数据即占比为零,此时可以进一步判断数据条带是否被使用。
若所有待更新数据块在数据条带中均为空并且数据条带未被使用,则可以从规则库中获取第一校验值更新规则。具体地,终端或服务器判断所有待更新数据块是否在数据条带中均为空,且判断数据条带是否被使用,判定所有待更新数据块在数据条带中均为空,且数据条带未被使用,基于该判定结果从规则库中获取第一校验值更新规则。
若所有待更新数据块在数据条带中均为空并且数据条带已被使用,则从规则库中获取第二校验值更新规则。具体地,终端或服务器判断所有待更新数据块是否在数据条带中均为空,且判断数据条带是否被使用,判定所有待更新数据块在数据条带中均为空,且数据条带已被使用,基于该判定结果从规则库中获取第二校验值更新规则。
若所有待更新数据块在数据条带中不均为空,则说明待更新数据块在数据条带中存储有数据即占比不为零,此时可以统计待更新数据块在数据条带中为空的第一个数值以及待更新数据块在数据条带中非空的第二个数值。具体地,终端或服务器判断所有待更新数据块是否在数据条带中均为空,判定所有待更新数据块在数据条带中不均为空,基于该判定结果可以统计待更新数据块在数据条带中为空的第一个数值以及待更新数据块在数据条带中非空的第二个数值。
若第一个数值小于或等于第二个数值,则从规则库中获取第三校验值更新规则;若第一个数值大于第二个数值,则从规则库中获取第四校验值更新规则。
S103:利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。
结合上述介绍的四种校验值更新规则,当校验值更新规则为第一校验值更新规则 时,可以将所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
以数据条带包含6个数据块为例,这6个数据块的状态值分别用d 0至d 5表示;D i表示待更新数据块的新状态值;P 0表示数据条带的原校验值,P 0'表示数据条带的新校验值。
假设,当前待更新数据块的新状态值为D 0和D 1,则表示需要将数据块d 0和d 1更新为D 0和D 1。如果待更新数据块D 0和D 1在数据条带中并未存储数据,并且数据条带未被使用,此时可以按照
Figure PCTCN2022074066-appb-000001
计算新校验值,其中,
Figure PCTCN2022074066-appb-000002
表示异或运算。
当校验值更新规则为第二校验值更新规则时,可以获取数据条带的原校验值;将原校验值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
假设,当前待更新数据块的新状态值为D 0和D 1,则表示需要将数据块d 0和d 1更新为D 0和D 1。如果待更新数据块D 0和D 1在数据条带中并未存储数据,但是数据条带中其它数据块已经被使用,此时可以按照
Figure PCTCN2022074066-appb-000003
计算新校验值。
当校验值更新规则为第三校验值更新规则时,可以获取数据条带中无需更新的数据块的状态值;对数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
假设,当前待更新数据块的新状态值为D 0和D 1,则表示需要将数据块d 0和d 1更新为D 0和D 1。如果至少一个待更新数据块D 0和D 1在数据条带中存储有数据,并且数据条带上第三个数据块上存储有数据,第三个数据块的状态值为d 2,可以统计待更新数据块在数据条带中为空的个数,用rcw表示;统计待更新数据块在数据条带中非空的个数,用rmw表示。此时rcw≤rmw,可以按照
Figure PCTCN2022074066-appb-000004
计算新校验值。
当校验值更新规则为第四校验值更新规则时,可以获取数据条带的原校验值以及所有待更新数据块的原状态值;对数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
假设,当前待更新数据块的新状态值为D 0和D 1,则表示需要将数据块d 0和d 1更新为D 0和D 1。如果至少一个待更新数据块D 0和D 1在数据条带中存储有数据,并且数据条带上所有数据块全部存储有数据,此时rcw>rmw,可以按照
Figure PCTCN2022074066-appb-000005
计算新校验值。
由上述技术方案可以看出,获取数据条带的更新指令;其中,更新指令中携带有待更新数据块的新状态值。待更新数据块在数据条带中的占比不同,以及数据条带的使用 状态不同其对应的校验值更新方式有所差异,在实际应用中,可以将待更新数据块在数据条带中的不同占比以及数据条带在不同使用状态下对应的校验值更新方式以规则的形式进行汇总,以建立规则库。依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,可以从建立的规则库中查询相匹配的校验值更新规则;利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。与传统技术中基于所有数据块的状态值对数据条带的校验值进行更新的方式相比,本申请依赖于校验值更新规则对待更新数据块的新状态值进行处理,可以实现数据条带校验值的更新,本申请降低了校验值更新的计算量,提升了校验值更新的效率。
图3为本申请实施例提供的一种RAID 5校验值的更新装置的结构示意图,包括获取单元21、查询单元22和处理单元23;
获取单元21,用于获取数据条带的更新指令;其中,更新指令中携带有待更新数据块的新状态值;
查询单元22,用于依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则;
处理单元23,用于利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。
在一个实施例中,规则库包括占比为零且数据条带未使用时对应的第一校验值更新规则;占比为零且数据条带已使用时对应的第二校验值更新规则;占比不为零且占比满足预设条件时对应的第三校验值更新规则;占比不为零且占比不满足预设条件时对应的第四校验值更新规则;
其中,第一校验值更新规则为依据所有待更新数据块的新状态值,确定出数据条带的新校验值;第二校验值更新规则为依据数据条带的原校验值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第三校验值更新规则为依据数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值;第四校验值更新规则为依据数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值,确定出数据条带的新校验值。
在一个实施例中,查询单元包括第一判断子单元、第二判断子单元、第一获取子单元、第二获取子单元、统计子单元、第三获取子单元和第四获取子单元;
第一判断子单元,用于判断所有待更新数据块是否在数据条带中均为空;
第二判断子单元,用于若所有待更新数据块在数据条带中均为空,则判断数据条带 是否被使用;
第一获取子单元,用于若数据条带未被使用,则从规则库中获取第一校验值更新规则;
第二获取子单元,用于若数据条带已被使用,则从规则库中获取第二校验值更新规则;
统计子单元,用于若所有待更新数据块在数据条带中不均为空,则统计待更新数据块在数据条带中为空的第一个数值以及待更新数据块在数据条带中非空的第二个数值;
第三获取子单元,用于若第一个数值小于或等于第二个数值,则从规则库中获取第三校验值更新规则;
第四获取子单元,用于若第一个数值大于第二个数值,则从规则库中获取第四校验值更新规则。
在一个实施例中,当校验值更新规则为第一校验值更新规则时,相应的,处理单元用于将所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在一个实施例中,当校验值更新规则为第二校验值更新规则时,相应的,处理单元用于获取数据条带的原校验值;将原校验值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在一个实施例中,当校验值更新规则为第三校验值更新规则时,相应的,处理单元用于获取数据条带中无需更新的数据块的状态值;对数据条带中无需更新的数据块的状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
在一个实施例中,当校验值更新规则为第四校验值更新规则时,相应的,处理单元用于获取数据条带的原校验值以及所有待更新数据块的原状态值;对数据条带的原校验值、所有待更新数据块的原状态值和所有待更新数据块的新状态值进行异或运算,将运算结果作为数据条带的新校验值。
图3所对应实施例中特征的说明可以参见图2所对应实施例的相关说明,这里不再一一赘述。
由上述技术方案可以看出,获取数据条带的更新指令;其中,更新指令中携带有待更新数据块的新状态值。待更新数据块在数据条带中的占比不同,以及数据条带的使用状态不同其对应的校验值更新方式有所差异,在实际应用中,可以将待更新数据块在数据条带中的不同占比以及数据条带在不同使用状态下对应的校验值更新方式以规则的形 式进行汇总,以建立规则库。依据所有待更新数据块在数据条带的占比以及数据条带的使用状态,可以从建立的规则库中查询相匹配的校验值更新规则;利用校验值更新规则,对待更新数据块的新状态值进行处理,以得到数据条带的新校验值。与传统技术中基于所有数据块的状态值对数据条带的校验值进行更新的方式相比,本申请依赖于校验值更新规则对待更新数据块的新状态值进行处理,可以实现数据条带校验值的更新,本申请降低了校验值更新的计算量,提升了校验值更新的效率。
图4为本申请实施例提供的一种RAID 5校验值的更新装置30的硬件结构示意图,该RAID 5校验值的更新装置30可以为计算机设备,该计算机设备可以为终端或服务器,该RAID 5校验值的更新装置30包括:
存储器31,用于存储计算机可读指令;
一个或多个处理器32,用于执行存储器存储的计算机可读指令,以该计算机可读指令被处理器执行时可实现如上述任意实施例所述的RAID 5校验值的更新方法的步骤。
本申请实施例还提供了一种非易失性可读存储介质,该非易失性可读存储介质中存储有计算机可读指令,该计算机可读指令计算机程序被一个或多个处理器执行时可实现如上述任意实施例所述的RAID 5校验值的更新方法的步骤。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (10)

  1. 一种RAID 5校验值的更新方法,其特征在于,包括:
    获取数据条带的更新指令;其中,所述更新指令中携带有待更新数据块的新状态值;
    依据所有所述待更新数据块在数据条带的占比以及所述数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则;和
    利用所述校验值更新规则,对所述待更新数据块的新状态值进行处理,以得到所述数据条带的新校验值。
  2. 根据权利要求1所述的RAID 5校验值的更新方法,其特征在于,所述规则库包括占比为零且数据条带未使用时对应的第一校验值更新规则;占比为零且数据条带已使用时对应的第二校验值更新规则;占比不为零且占比满足预设条件时对应的第三校验值更新规则;占比不为零且占比不满足预设条件时对应的第四校验值更新规则;
    其中,所述第一校验值更新规则为依据所有所述待更新数据块的新状态值,确定出所述数据条带的新校验值;所述第二校验值更新规则为依据所述数据条带的原校验值和所有所述待更新数据块的新状态值,确定出所述数据条带的新校验值;所述第三校验值更新规则为依据所述数据条带中无需更新的数据块的状态值和所有所述待更新数据块的新状态值,确定出所述数据条带的新校验值;所述第四校验值更新规则为依据所述数据条带的原校验值、所有所述待更新数据块的原状态值和所有所述待更新数据块的新状态值,确定出所述数据条带的新校验值。
  3. 根据权利要求2所述的RAID 5校验值的更新方法,其特征在于,所述依据所有所述待更新数据块在数据条带的占比以及所述数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则包括:
    在所有所述待更新数据块在数据条带中均为空,且所述数据条带未被使用时,从所述规则库中获取第一校验值更新规则;
    在所有所述待更新数据块在数据条带中均为空,且所述数据条带已被使用时,从所述规则库中获取第二校验值更新规则;
    在所有所述待更新数据块在数据条带中不均为空时,统计待更新数据块在数据条带中为空的第一个数值以及待更新数据块在数据条带中非空的第二个数值;
    在第一个数值小于或等于所述第二个数值时,从所述规则库中获取第三校验值更新规则;和
    在第一个数值大于所述第二个数值时,从所述规则库中获取第四校验值更新规则。
  4. 根据权利要求3所述的RAID 5校验值的更新方法,其特征在于,在所述校验值更新规则为第一校验值更新规则时,所述利用所述校验值更新规则,对所述待更新数据块的新状态值进行处理,以得到所述数据条带的新校验值包括:
    将所有所述待更新数据块的新状态值进行异或运算,将运算结果作为所述数据条带的新校验值。
  5. 根据权利要求3所述的RAID 5校验值的更新方法,其特征在于,在所述校验值更新规则为第二校验值更新规则时,所述利用所述校验值更新规则,对所述待更新数据块的新状态值进行处理,以得到所述数据条带的新校验值包括:
    获取所述数据条带的原校验值;和
    将所述原校验值和所有所述待更新数据块的新状态值进行异或运算,将运算结果作为所述数据条带的新校验值。
  6. 根据权利要求3所述的RAID 5校验值的更新方法,其特征在于,在所述校验值更新规则为第三校验值更新规则时,所述利用所述校验值更新规则,对所述待更新数据块的新状态值进行处理,以得到所述数据条带的新校验值包括:
    获取所述数据条带中无需更新的数据块的状态值;和
    对所述数据条带中无需更新的数据块的状态值和所有所述待更新数据块的新状态值进行异或运算,将运算结果作为所述数据条带的新校验值。
  7. 根据权利要求3所述的RAID 5校验值的更新方法,其特征在于,在所述校验值更新规则为第四校验值更新规则时,所述利用所述校验值更新规则,对所述待更新数据块的新状态值进行处理,以得到所述数据条带的新校验值包括:
    获取所述数据条带的原校验值以及所有所述待更新数据块的原状态值;和
    对所述数据条带的原校验值、所有所述待更新数据块的原状态值和所有所述待更新数据块的新状态值进行异或运算,将运算结果作为所述数据条带的新校验值。
  8. 一种RAID 5校验值的更新装置,其特征在于,包括获取单元、查询单元和处理单元;
    所述获取单元,用于获取数据条带的更新指令;其中,所述更新指令中携带有待更新数据块的新状态值;
    所述查询单元,用于依据所有所述待更新数据块在数据条带的占比以及所述数据条带的使用状态,从建立的规则库中查询相匹配的校验值更新规则;和
    所述处理单元,用于利用所述校验值更新规则,对所述待更新数据块的新状态值进行处理,以得到所述数据条带的新校验值。
  9. 一种RAID 5校验值的更新装置,其特征在于,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-7任意一项所述的方法的步骤。
  10. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-7任意一项所述的方法的步骤。
PCT/CN2022/074066 2021-02-25 2022-01-26 一种raid 5校验值的更新方法、装置和介质 WO2022179377A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/272,144 US20240143495A1 (en) 2021-02-25 2022-01-26 Method and apparatus for updating raid 5 check value, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110211375.2 2021-02-25
CN202110211375.2A CN112947858B (zh) 2021-02-25 2021-02-25 一种raid 5校验值的更新方法、装置和介质

Publications (1)

Publication Number Publication Date
WO2022179377A1 true WO2022179377A1 (zh) 2022-09-01

Family

ID=76246192

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/074066 WO2022179377A1 (zh) 2021-02-25 2022-01-26 一种raid 5校验值的更新方法、装置和介质

Country Status (3)

Country Link
US (1) US20240143495A1 (zh)
CN (1) CN112947858B (zh)
WO (1) WO2022179377A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112947858B (zh) * 2021-02-25 2023-04-25 浪潮电子信息产业股份有限公司 一种raid 5校验值的更新方法、装置和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1118503A (zh) * 1994-05-05 1996-03-13 国际商业机器公司 带有空闲块奇偶校验高速缓存的第五级raid
US6282671B1 (en) * 1998-11-10 2001-08-28 International Business Machines Corporation Method and system for improved efficiency of parity calculation in RAID system
CN110568993A (zh) * 2019-08-06 2019-12-13 新华三技术有限公司成都分公司 一种数据更新方法及相关装置
CN110618895A (zh) * 2019-09-29 2019-12-27 北京天融信网络安全技术有限公司 一种基于纠删码的数据更新方法、装置和存储介质
CN112947858A (zh) * 2021-02-25 2021-06-11 浪潮电子信息产业股份有限公司 一种raid 5校验值的更新方法、装置和介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6052288B2 (ja) * 2012-07-13 2016-12-27 富士通株式会社 ディスクアレイ制御装置、ディスクアレイ制御方法及びディスクアレイ制御プログラム
CN106788468B (zh) * 2016-11-28 2021-01-01 北京三快在线科技有限公司 一种纠删码更新方法及装置,电子设备
CN110147289B (zh) * 2018-02-13 2023-11-03 北京京东尚科信息技术有限公司 异常消息筛选方法和装置以及计算机可读存储介质
CN108717383A (zh) * 2018-04-03 2018-10-30 华为技术有限公司 一种更新校验块的方法和设备
CN108776665B (zh) * 2018-04-20 2021-01-12 北京奇艺世纪科技有限公司 一种数据处理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1118503A (zh) * 1994-05-05 1996-03-13 国际商业机器公司 带有空闲块奇偶校验高速缓存的第五级raid
US6282671B1 (en) * 1998-11-10 2001-08-28 International Business Machines Corporation Method and system for improved efficiency of parity calculation in RAID system
CN110568993A (zh) * 2019-08-06 2019-12-13 新华三技术有限公司成都分公司 一种数据更新方法及相关装置
CN110618895A (zh) * 2019-09-29 2019-12-27 北京天融信网络安全技术有限公司 一种基于纠删码的数据更新方法、装置和存储介质
CN112947858A (zh) * 2021-02-25 2021-06-11 浪潮电子信息产业股份有限公司 一种raid 5校验值的更新方法、装置和介质

Also Published As

Publication number Publication date
CN112947858B (zh) 2023-04-25
US20240143495A1 (en) 2024-05-02
CN112947858A (zh) 2021-06-11

Similar Documents

Publication Publication Date Title
US10198363B2 (en) Reducing data I/O using in-memory data structures
US9798756B2 (en) Systems, methods and computer program products for probing a hash table for improved latency and scalability in a processing system
US10222987B2 (en) Data deduplication with augmented cuckoo filters
US11349639B2 (en) Circuit and method for overcoming memory bottleneck of ASIC-resistant cryptographic algorithms
WO2020029368A1 (zh) 数据存储方法、装置、计算机设备及存储介质
Jha et al. A space-efficient streaming algorithm for estimating transitivity and triangle counts using the birthday paradox
US20200387502A1 (en) Hybrid in-memory/pageable spatial column data
WO2022143540A1 (zh) 区块链索引的存储方法、装置、计算机设备及介质
CN107077453B (zh) 用于使用集群缓存进行数据库查询的并行优化的系统和方法
CN111177302A (zh) 业务单据处理方法、装置、计算机设备和存储介质
WO2021031687A1 (zh) 数据库分库分表的分页查询方法、装置和计算机设备
US20070142925A1 (en) Bundling database
CN112015820A (zh) 分布式图数据库实现的方法、系统、电子装置和存储介质
US20240126817A1 (en) Graph data query
WO2017161540A1 (zh) 数据查询的方法、数据对象的存储方法和数据系统
WO2021051782A1 (zh) 区块链的共识方法、装置及设备
US20190042615A1 (en) Hybrid concurrency control
WO2022179377A1 (zh) 一种raid 5校验值的更新方法、装置和介质
CN108762915B (zh) 一种在gpu内存中缓存rdf数据的方法
US10073872B2 (en) Hybrid heap memory management
CN115470156A (zh) 基于rdma的内存使用方法、系统、电子设备和存储介质
McCoy et al. High-performance filters for gpus
CN107862082B (zh) 基于MySQL计数器表的高并发计数方法及web服务器
US11455288B2 (en) Version table scheme for fast version space access
US7930486B2 (en) Cache chunked list concrete data type

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22758742

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18272144

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22758742

Country of ref document: EP

Kind code of ref document: A1