Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device of redirecting wirte-in

A redirection and to-be-written technology, applied in the field of communications, can solve the problems of data write failure and to-be-written data unable to be written.

Active Publication Date: 2014-11-26
HUAWEI TECH CO LTD
View PDF4 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a method and device for redirecting writing to solve the problem in the prior art that when the data to be written is smaller than the size of the stripe, if the latest saved data in the corresponding stripe fails to be read, the data to be written The input data cannot be written into the corresponding shard, and the data writing fails.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device of redirecting wirte-in
  • Method and device of redirecting wirte-in
  • Method and device of redirecting wirte-in

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0070] figure 1 It is a flow chart of the redirected writing method provided by Embodiment 1 of the present invention, as shown in figure 1 As shown, it specifically includes the following steps:

[0071] Step 101, receiving a write command, the write command includes data to be written and a stripe address;

[0072] Step 102, comparing the size of the data to be written with the size of the stripe corresponding to the stripe address;

[0073] Step 103. If the size of the data to be written is smaller than the size of the stripe, determine whether the first data last saved by the stripe can be successfully read;

[0074] Step 104. If the reading fails, merge the data to be written with the second data to obtain data to be written that is the same size as the stripe and write it into the stripe, wherein the The second data is used to replace the first data and the size of the second data is equal to the size of the stripe.

[0075] Redirected write (ROW) means that when sav...

Embodiment 2

[0088] This embodiment is a specific implementation step for determining whether the first data saved last time in the stripe can be successfully read in step 103 of the first embodiment, figure 2 The flow chart of the redirected writing method provided by Embodiment 2 of the present invention, such as figure 2 As shown, it specifically includes the following steps:

[0089] Step 201, read bad block mark;

[0090] Step 202, determining whether the block where the first data is located is marked as a bad block;

[0091] Step 203, if not, then determine whether the first data can be read;

[0092] Step 204, if it cannot be read, then determine whether the first data can be restored redundantly;

[0093] Step 205, if not, it can be determined that the first data cannot be successfully read;

[0094] Step 206, if the first data can be read in step 203, or the first data can be redundantly restored in step 204, then it can be determined that the first data can be read success...

Embodiment 3

[0098] Embodiment 3 is based on Embodiment 1. The data to be written is complete data, and the complete data is smaller than the size of the stripe. image 3 The flow chart of the redirected writing method provided by Embodiment 3 of the present invention, such as image 3 As shown, it specifically includes the following steps:

[0099] Step 301, receiving a complete data write instruction;

[0100] Step 302, determine whether the complete data is smaller than the stripe size;

[0101] Step 303, if the determined result of step 302 is that the complete data is smaller than the size of the stripe, then determine whether the last written first data in the stripe corresponding to the complete data can be successfully read;

[0102] Step 304, if step 303 can be read successfully, merge the complete data with the first data;

[0103] Step 305, if step 303 cannot be successfully read, then replace the first data with the second data and merge with the complete data;

[0104] Ste...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a method and device of redirecting wirte-in. The method of redirecting write-in comprises receiving a write-in instruction which comprises data to be written and subsection addresses; comparing a size of the data to be written with a size of a corresponding subsection; determining whether first data restored last time by the subsection address can be read successfully if the size of the data to be written is samller than the size of the subsection; and combining the data to be written with second data to obtain data to be written having a same size the subsection, wherein the second data is used for replacing the first data and the size of the sexond data is equal to the size of the subsection. According to the invention, the problem is solved that when the data to be written is smaller than the subsection, and data restored last time by a corresponding subsection is not written sucecessfully, data write-in fails.

Description

technical field [0001] Embodiments of the present invention relate to communication technologies, and in particular, to a redirection writing method and device. Background technique [0002] Redirect On Write (ROW for short) and Copy On Write (COW for short) are two methods of hard disk writing. [0003] In the existing ROW writing method, when data is written into a stripe, if the size of the data to be written is smaller than the size of the stripe, the last saved data in the stripe will be read first, and then the read data will be compared with The data to be written is merged to generate a data with the same size as the stripe, and finally the merged data is written into a new stripe. [0004] In the above-mentioned existing ROW writing method, if the data to be written is smaller than the size of the stripe, if the last saved data in the corresponding stripe fails to be read, the data to be written will not be written into the corresponding stripe , resulting in data...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F3/06
Inventor 曹长斌李大权
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products