WO2015035814A1 - Procédé d'écriture de données et dispositif de stockage - Google Patents

Procédé d'écriture de données et dispositif de stockage Download PDF

Info

Publication number
WO2015035814A1
WO2015035814A1 PCT/CN2014/080477 CN2014080477W WO2015035814A1 WO 2015035814 A1 WO2015035814 A1 WO 2015035814A1 CN 2014080477 W CN2014080477 W CN 2014080477W WO 2015035814 A1 WO2015035814 A1 WO 2015035814A1
Authority
WO
WIPO (PCT)
Prior art keywords
data request
write data
cache
value
initial
Prior art date
Application number
PCT/CN2014/080477
Other languages
English (en)
Chinese (zh)
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 华为技术有限公司
Publication of WO2015035814A1 publication Critical patent/WO2015035814A1/fr

Links

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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0868Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
    • 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/14Error detection or correction of the data by redundancy in operation
    • 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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • 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/061Improving I/O performance
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • 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/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the present invention relates to the field of storage technologies, and in particular, to a data writing method and a storage device.
  • a snapshot is a fully available copy of a specified data set that includes an image of the corresponding data at a point in time (the point in time when the copy begins).
  • a snapshot can be a copy of the data it represents, or it can be a replica of the data.
  • the role of snapshots is primarily to enable online data backup and recovery.
  • the embodiment of the invention provides a method for writing data and a storage device, which can improve the efficiency of writing data, and can prevent the write data request written to the cache after the snapshot is activated from overwriting the write data request written to the cache before the snapshot is activated.
  • a first aspect of the embodiments of the present invention provides a method for writing data, where the method for writing data is applied to a storage device, where the storage device includes a controller and a memory, and the controller includes a processor and a cache, where The method includes: the controller receiving at least one of a number sent by a host Write a data request;
  • the controller adds a first number to the first write data request, where the first number is an initial time point TP value;
  • the controller writes a first write data request after adding the first number to the cache; the controller modifies the initial TP value when the snapshot is activated, to identify the subsequent first with the modified initial TP value Write a data request;
  • the controller reads the first write data request after adding the first number from the cache, and writes the memory to the memory.
  • the method further includes: the controller receiving a second write data request;
  • the controller adds a second number to the second write data request, where the second number is a modified initial TP value
  • the controller writes a second write data request after adding the second number to the cache; when the controller activates the snapshot, the modified initial TP value is modified to use the modified initial modified The TP value identifies a subsequent second write data request;
  • the controller reads the second write data request after adding the second number from the cache, and writes the memory.
  • the method further includes: determining, by the controller, whether the first number is smaller than The second number;
  • the controller reads the second write data request after adding the second number from the cache, and writing the memory includes: from the cache Reading the first write data request after adding the first number, after writing to the memory, reading the second write data request after adding the second number from the cache, and writing the Memory.
  • the first write data request further includes a logical block address LBA and target data
  • the controller writes the first write data request after adding the first number to the cache includes: the controller writing the correspondence between the first number, the LBA and the target data into the cache.
  • a fourth aspect of the first aspect of the embodiments of the present invention In the method, the method further includes: the controller recording the initial TP value.
  • the first write data request further includes an identifier ID of the storage object
  • the method further includes:
  • the controller determines an initial TP value corresponding to the first write data request according to the ID of the storage object.
  • a second aspect of the embodiments of the present invention provides a storage device, where the storage device includes: a receiving unit, configured to receive at least one first write data request sent by a host;
  • a number increasing unit configured to add a first number to the first write data request, where the first number is an initial time point TP value;
  • a first writing unit configured to write a first write data request after adding the first number to the cache
  • a modifying unit configured to modify the initial TP value when the snapshot is activated, to use the modified initial TP value Identifying a subsequent first write data request
  • a second writing unit configured to read the first write data request after adding the first number from the cache, and write the memory to the memory.
  • the receiving unit is further configured to: receive a second write data request
  • the number adding unit is further configured to: add a second number to the second write data request, where the second number is a modified initial TP value;
  • the first writing unit is further configured to: write a second write data request after adding the second number to the cache;
  • the modifying unit is further configured to: modify the modified initial TP value when the snapshot is activated, to identify the subsequent second write data request by using the modified initial TP value;
  • the second writing unit is further configured to: read the second write data request after adding the second number from the cache, and write the memory to the memory.
  • the storage device further includes:
  • a determining unit configured to determine whether the first number is smaller than the second number
  • the second write unit reads the second write data request after adding the second number from the cache, and writing the memory includes:
  • the storage device further includes: a recording unit, configured to record the initial TP value.
  • the embodiments of the present invention have the following advantages:
  • the first number is an initial time point TP value; and the write data request after adding the first number is written into the cache.
  • the initial TP value is modified when the snapshot is activated to identify the subsequent write data request with the modified initial TP value; the write data request after the first number is added from the cache is written to the memory.
  • the write data request written to the cache after the snapshot is activated Both have different TP values than write data requests written to the cache before the snapshot is activated, so there is no need to block the write data request after the snapshot is activated, which improves the data writing efficiency. And because the write data request written to the cache after the snapshot is activated has a different number than the write data request written to the cache before the snapshot is activated, the data carried in the write data request written to the cache before the snapshot is activated will not be written after the snapshot is activated. The data carried by the data request is overwritten, and the data carried in the write data request written to the cache before the snapshot is activated may be saved as snapshot data in the cache.
  • FIG. 1 is an application scenario diagram of a method for writing data in an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an embodiment of a method for writing data according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of another embodiment of a method for writing data according to an embodiment of the present invention.
  • 4 is a schematic diagram of an embodiment of a storage device according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another embodiment of a storage device according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of another embodiment of a storage device according to an embodiment of the present invention.
  • the embodiment of the invention provides a method for writing data, a processor and a storage device, which can improve the writing efficiency of the data, and can avoid the write data request of the write cache after the snapshot is activated, and the write data request written to the cache before the snapshot is activated. .
  • FIG. 1 is an application scenario diagram of a method for writing data according to an embodiment of the present invention.
  • the method for writing data according to an embodiment of the present invention is applied to a storage device 100, and the storage device 100 is connected to the host 120 through a connection device 110.
  • the host 120 can include any computing device known in the art, such as a server, a desktop computer, and the like. Inside the host 120, an operating system and other applications are installed.
  • Connection device 110 may include any interface between a storage device and a host known in the art, such as a fiber switch, or other existing switch.
  • the storage device 100 may include storage devices known in the prior art, such as Redundant Arrays of Independent Disks (RAID), Just a Bunch Of Disks (JBOD), and Direct Access Storage Device. , DASD ) One or more interconnected disk drives, such as tape libraries, one or more storage units of tape storage devices.
  • RAID Redundant Arrays of Independent Disks
  • JBOD Just a Bunch Of Disks
  • DASD Direct Access Storage Device
  • One or more interconnected disk drives such as tape libraries, one or more storage units of tape storage devices.
  • the storage device 100 includes a controller 101 and a memory 102.
  • the controller 101 is equivalent to the processor of the storage device 100, and is installed with an operating system and other software programs.
  • a cache 1010 is included, and the cache 1010 is a buffer memory between a central processing unit (CPU) and the memory 102.
  • the memory 102 can be a hard disk, and the size of the cache 1010 is smaller than that of the hard disk, but the speed is faster than the hard disk.
  • the controller 101 receives at least one first write data request sent by the host 120, which is the first write number.
  • the first number is added according to the request, the first number is the initial time point (Time Point, TP) value, and the first write data request after adding the first number is written into the cache 1010; the initial TP value is modified when the snapshot is activated, The modified initial TP value identifies a subsequent first write data request; the first write data request after the first number is added from the cache 1010 is written to the memory 102.
  • TP Time Point
  • an embodiment of the method for writing data in the embodiment of the present invention includes:
  • the controller receives at least one first write data request sent by the host.
  • the controller adds a first number to the first write data request, where the first number is an initial TP value, and an initial
  • the TP value can be expressed by any positive number, for example, 1, 2, etc.; it can also be represented by any letter, such as a, b, etc., which is not specifically limited herein.
  • the controller adds the first number to the first write data request
  • the first write data request with the first number added is written into the cache.
  • the controller modifies the initial TP value when it needs to activate the snapshot.
  • the initial TP value is 1.
  • the initial TP value is changed to 2, and then 2 is used to identify the write data request written to the cache after the snapshot is activated.
  • the controller after receiving the at least one write data request sent by the host, the controller adds a first number to the write data request, where the first number is an initial TP value; and the write data request after adding the first number is written into the cache; The initial TP value is modified when the snapshot is activated to identify the subsequent write data request with the modified initial TP value; the write data request after the first number is added from the cache is written to the memory.
  • the controller since the write data is requested to be written to the cache, the controller has already written data for each The request adds an initial TP value, and the initial TP value is modified when the snapshot is activated. Since the write data request written to the cache after the snapshot is activated has a different write data request than the write cache before the snapshot is activated.
  • the TP value therefore, does not block the write data request after the snapshot is activated, which improves the data writing efficiency. And because the write data request written to the cache after the snapshot is activated has a different number than the write data request written to the cache before the snapshot is activated, the data carried in the write data request written to the cache before the snapshot is activated will not be written after the snapshot is activated. The data carried by the data request is overwritten, and the data carried in the write data request written to the cache before the snapshot is activated may be saved as snapshot data in the cache. When the host needs to read the snapshot data, it can read directly from the cache, and the reading speed is fast.
  • FIG. 3 another embodiment of the method for writing data in the embodiment of the present invention includes:
  • the controller When creating a storage object, the controller adds an initial TP value to each storage object, and each storage object itself has an identity (ID).
  • the controller records the initial TP value of each storage object.
  • the initial TP value can be expressed by any positive number, such as 1, 2, etc.; it can also be represented by any letter, such as a, b, etc. This is not limited here.
  • the initial TP value of each storage object can be the same or different, but the ID of each storage object is different.
  • the storage object represents a logical storage space, and the storage object can be a logical disk space, for example: a Logical Unit Number (LU), or a file, or a directory, which is not limited herein.
  • LU Logical Unit Number
  • the controller receives at least one first write data request sent by the host, where the first write data request includes an ID of the storage object, a logical block address (LBA), and target data.
  • the first write data request includes an ID of the storage object, a logical block address (LBA), and target data.
  • LBA logical block address
  • the controller determines an initial TP value corresponding to the first write data request according to the ID of the storage object included in the first write data request. Specifically, the controller determines, according to the ID of the storage object included in the first write data request, the storage object that the first write data request needs to be written, and then acquires the initial TP value of the storage object. The controller takes the initial TP value of the storage object as the first number, and adds the first number to the first write data request.
  • the controller determines the first write data request according to the ID of the storage object carried in the first write data request
  • the storage object written in the cache determines the address of the storage object according to the LBA carried in the first write data request, and then writes the target data and the corresponding number in the first write data request to the cache.
  • the controller When the controller activates a snapshot for a storage object, the initial TP value of the storage object is modified, and the modified initial TP value is used to identify a write data request written to the storage object after the snapshot is activated.
  • the snapshot of the storage object may be a Copy On Write (COW) or a Redirect On Write (ROW).
  • COW Copy On Write
  • ROW Redirect On Write
  • the controller After the controller activates the snapshot for a certain storage object, it will continue to receive the write data request, that is, the second write data request.
  • the second write data request includes the storage object ID, LBA and target data.
  • the controller determines, according to the ID of the storage object carried in the second write data request, the TP value corresponding to the second write data request.
  • the TP value corresponding to the second write data request is the second number, and the second write data request is added with the second number.
  • the controller increments the write data request for all writes to the storage object by one before activating the snapshot for that storage object.
  • the controller modifies the initial TP value of the storage object. For example, the initial TP value of the storage object can be modified from 1 to 2, and the controller record storage object now has a TP value of 2.
  • the controller adds a number 2 to the write data request that needs to be written to the storage object, and the controller writes the write data of the storage object before the snapshot is activated for the storage object again. The number requested to be added is 2.
  • the controller determines, according to the ID of the storage object carried in the second write data request, the storage object that is written in the cache by the second write data request, and determines the address of the storage object by carrying the LBA according to the second write data request, and the second write The target data in the data request and the corresponding number are written to the cache.
  • step 308 determines whether the first number is less than the second number, if less than, step 309 is performed, if it is greater, step 310 is performed;
  • the cache Since the cache is only a temporary data storage area, and the cache storage space is limited, the write data request written to the cache is finally written to the memory for backup.
  • steps 308 to 310 describe that the TP value set in a certain storage object is a positive integer, and the TP value is set according to the value from small to large, so that the target data carried by the write request with a small number can be written first.
  • the memory writes the target data carried by the numbered write data request to the memory.
  • steps 308 to 310 are merely exemplified by the fact that the TP value of the storage object is a positive integer, and the controller writes the target data in the write data request written in the cache according to the order in which the target data is written into the cache.
  • Write to the memory that is, the target data written to the cache first is written to the memory, and the target data written to the cache is written to the memory after the target data written to the cache is first written to the memory.
  • the positive integer or letter set by the TP value of the storage object it can be written into the memory according to the write principle of writing the cached target data first and writing the memory first.
  • the controller increases the current TP value of the storage object for the write data request of each storage object in the write cache, and when the snapshot is activated for the storage object, the TP value of the storage object is modified, and then the predetermined TP value is The write data request in the cache is written to the memory in sequence.
  • the controller since the controller has added an initial TP value for each write data request before the write data request is written to the cache, and the initial TP value is modified when the snapshot is activated, the write cache is written after the snapshot is activated.
  • the data request has a different TP value than the write data request written to the cache before the snapshot is activated, so the write data request after the snapshot activation is not blocked, which improves the data writing efficiency.
  • the write data request written to the cache after the snapshot is activated has a different number than the write data request written to the cache before the snapshot is activated, the data carried in the write data request written to the cache before the snapshot is activated is not activated by the snapshot.
  • the data carried by the write data request is overwritten, and the data carried in the write data request written to the cache before the snapshot is activated may be saved as snapshot data in the cache.
  • the host needs to read the snapshot data, it can read directly from the cache, and the reading speed is fast.
  • One embodiment of a storage device includes:
  • the receiving unit 401 is configured to receive at least one first write data request sent by the host, and the number adding unit 402 is configured to add a first number to the first write data request, where the first number is an initial time point TP value;
  • a first writing unit 403 configured to write a first write data request after adding the first number to the cache
  • a modifying unit 404 configured to modify the initial TP value when the snapshot is activated, to identify the subsequent initial TP value First write data request
  • the second writing unit 405 is configured to read the first write data request after adding the first number from the cache, and write the memory to the memory.
  • the receiving unit 401 receives the at least one first write data request sent by the host, and the number adding unit 402 adds a first number to the first write data request received by the receiving unit 401, where the first number is an initial time point (TP) value.
  • the initial TP value may be represented by any positive number, for example, 1, 2, etc.; or may be represented by any letter, such as a, b, etc., which is not specifically limited herein.
  • the first write unit 403 writes the first write data request with the first number added to the cache after the number increase unit 402 adds the first number to the first write data request.
  • the modification unit 404 modifies the initial TP value when the snapshot is activated to identify the subsequent first write data request with the modified initial TP value. For example, when the initial TP value is 1, when the snapshot is activated, the modification unit 404 modifies the initial TP value to 2 to identify the write data request written to the cache after the snapshot is activated.
  • the second write unit 405 It is also necessary to read the first write data request after adding the first number in the cache and write it to the memory.
  • the number increasing unit adds a first number to the write data request, where the first number is the initial time point TP value; the first writing unit increases the first number.
  • the numbered write data request is written to the cache; the modification unit modifies the initial TP value when the snapshot is activated to identify the subsequent write data request with the modified initial TP value; the second write unit reads the first number from the cache After the write data request, write to the memory.
  • the number incrementing unit has already increased the initial TP value for each write data request before the write data request is written to the cache, and the modification unit modifies the initial TP value when the snapshot is activated, because the write cache is written after the snapshot is activated.
  • the data request has a different TP value than the write data request written to the cache before the snapshot is activated, so the write data request after the snapshot activation is not blocked, which improves the data writing efficiency.
  • the write data request written to the cache after the snapshot is activated has a different number than the write data request written to the cache before the snapshot is activated, the data carried in the write data request written to the cache before the snapshot is activated is not activated by the snapshot.
  • the data carried by the write data request is overwritten, and the data carried in the write data request written to the cache before the snapshot is activated may be saved as snapshot data in the cache. When the host needs to read the snapshot data, it can read directly from the cache, and the reading speed is fast.
  • FIG. 5 another embodiment of the storage device in the embodiment of the present invention includes:
  • a recording unit 501 configured to record an initial TP value of the storage object
  • the receiving unit 502 is configured to receive a first write data request sent by the host to the storage object before the snapshot is activated, and a second write data request sent to the storage object after the snapshot is activated;
  • a determining unit 503 configured to determine, according to an ID of the storage object included in the write data request, an initial TP value corresponding to the first write data request and a TP value corresponding to the second write data request;
  • the number increasing unit 504 is configured to add a first number to the first write data request, and add a second number to the second write data request, where the first number is an initial TP value, and the second number is a modified initial TP value;
  • the writing unit 505 is configured to write a first write data request after adding the first number and a second write data request after adding the second number to the cache;
  • the modifying unit 506 is configured to modify the initial TP value when the snapshot is activated, to identify, by using the modified initial TP value, the second write data request written to the storage object after the snapshot is activated;
  • the determining unit 507 is configured to determine whether the first number is smaller than the second number
  • the second writing unit 508 is configured to: when the determination result of the determining unit 507 is that the first number is smaller than the second number, read the first write data request after adding the first number from the cache, write the memory, and then A second write data request after adding the second number is read in the cache and written into the memory.
  • the recording unit 501 adds an initial TP value to each storage object and records The initial TP value of each storage object is recorded, and each storage object also has an ID.
  • the initial TP value can be expressed by any positive number, such as 1, 2, etc.; it can also be represented by any letter, such as a, b, and the like. This is not limited here.
  • the initial TP values of each storage object may be the same or different, but the ID of each storage object is different.
  • the storage object represents a logical storage space, and the storage object can be a logical disk space, for example: a Logical Unit Number (LU), or a file, or a directory, which is not limited herein.
  • LU Logical Unit Number
  • the receiving unit 502 receives at least one first write data request sent by the host, where the first write data request includes an ID of a storage object, a logical block address (LB A ), and target data.
  • the first write data request includes an ID of a storage object, a logical block address (LB A ), and target data.
  • the determining unit 503 determines an initial TP value corresponding to the first write data request based on the ID of the storage object included in the first write data request. Specifically, the determining unit 503 determines, according to the ID of the storage object included in the first write data request, the storage object that the first write data request needs to be written, and then obtains the initial TP value of the storage object, and the initial TP value of the storage object. The initial TP value corresponding to the first write data request.
  • the number adding unit 504 takes the initial TP value corresponding to the first write data request determined by the determining unit 503 as the first number, and adds the first number to the first write data request.
  • the first writing unit 505 determines, according to the ID of the storage object carried in the first write data request, the storage object that the first write data request is written in the cache, and determines the address of the storage object according to the first write data request carrying the LBA. The target data and the corresponding number in the first write data request are then written to the cache.
  • the modifying unit 506 modifies the initial TP value of the storage object when the storage object is activated to the snapshot, and the modified initial TP value is used to identify the write data request written to the storage object after the snapshot is activated, and the recording unit 501 records the current storage object. TP value.
  • the snapshot of the stored object may be a Copy On Write (COW) or a Redirect On Write (ROW).
  • the receiving unit 502 continues to receive the write data request sent by the host, that is, the second write data request, after the storage object is activated, and the second write data request includes the ID, LBA and target data of the storage object.
  • the determining unit 503 stores the storage pair carried in the second write data request received by the receiving unit 502.
  • the ID of the image determines the TP value corresponding to the second write data request
  • the number increasing unit 504 uses the TP value corresponding to the second write data request as the second number, and adds the second number to the second write data request.
  • the initial TP value of a storage object is 1
  • the number incrementing unit 504 adds 1 to all write data requests written to the storage object before the snapshot is activated for the storage object.
  • the modifying unit 506 modifies the initial TP value of the storage object.
  • the initial TP value of the storage object may be modified from 1 to 2.
  • the recording unit 401 records the TP value currently stored by the storage object. 2.
  • the number incrementing unit 504 adds a number 2 to the write data request that needs to be written to the storage object, until the snapshot is activated for the storage object again, the number increasing unit 504 needs to write the storage.
  • the object's write data request is incremented by two.
  • the first writing unit 505 determines, according to the ID of the storage object carried in the second write data request, the storage object written in the cache by the second write data request, and determines the address of the storage object according to the second write data request carrying the LBA.
  • the target data and the corresponding number in the second write data request are written into the cache.
  • the cache Since the cache is only a temporary data storage area, and the cache storage space is limited, the write data request written to the cache is finally written to the memory for backup.
  • the determining unit 507 may determine whether the first number is smaller than the second number. If the value is less than, the second writing unit 508 first writes the first write data request after adding the first number in the cache to the memory, and then The second write data request after adding the second number in the cache is written into the memory; if it is greater, the second write unit 508 first writes the second write data request after adding the second number in the cache to the memory, and then the cache The first write data request after the first number is added is written to the memory.
  • the above is only a positive integer set by the TP value of a certain storage object, and the TP value is set as an example from small to large.
  • the target data carried by the write request with a small number can be written to the memory, and the target data carried by the write request with the large number is written into the memory.
  • the principle that the second write unit 508 writes the write data request in the cache into the memory is: according to the order in which the target data in the write data request is written to the cache, After entering the memory, the target data written to the cache is first written to the memory, and the target data written to the cache is written to the memory after the target data written to the cache is first written to the memory. Therefore, in practical applications, regardless of the positive integer set by the TP value of the storage object, or the word Both the parent and the second write unit 508 can write the target data in the cache to the memory according to the above principle.
  • the number increasing unit increases the current TP value of the storage object for the write data request written to each storage object in the cache, and when the snapshot is activated for the storage object, the modifying unit modifies the TP value of the storage object, and then The second write unit writes the write data request in the cache to the memory in a predetermined order.
  • the modification unit modifies the initial TP value when the snapshot is activated, since the snapshot is activated after the snapshot is activated.
  • the cached write data requests have different TP values than the write data requests written to the cache before the snapshot is activated, so the write data request after the snapshot is activated is not blocked, which improves the data writing efficiency. And since the write data request written to the cache after the snapshot is activated has a different number than the write data request written to the cache before the snapshot is activated, the data carried in the write data request written to the cache before the snapshot is activated is not activated by the snapshot. The data carried by the write data request is overwritten, and the data carried in the write data request written to the cache before the snapshot is activated may be saved as snapshot data in the cache. When the host needs to read the snapshot data, it can read directly from the cache, and the reading speed is fast.
  • the storage device 600 in the embodiment of the present invention is further described.
  • the storage device 600 may include a storage device known in the prior art.
  • the specific embodiment of the present invention does not limit the specific implementation of the storage device 600.
  • the storage device 600 includes:
  • a processor (rocessor) 610 a communication interface (620), a memory 630, and a bus 640.
  • the processor 610, the communication interface 620, and the memory 630 complete communication with each other via the bus 640.
  • the communication interface 620 is configured to communicate with the network element.
  • the processor 610 is configured to execute the program 632.
  • program 632 can include program code, the program code including computer operating instructions.
  • Processor 610 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the memory 630 is configured to store the program 632.
  • the memory 630 may include a high speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. Reservoir.
  • the program 632 may specifically include:
  • the receiving unit 401 is configured to receive at least one first write data request sent by the host.
  • the number increasing unit 402 is configured to add a first number to the first write data request, where the first number is the initial time point TP value.
  • the first writing unit 403 is configured to write the first write data request after adding the first number to the cache.
  • the modifying unit 404 is configured to modify the initial TP value when the snapshot is activated, to identify the subsequent first write data request with the modified initial TP value.
  • the second writing unit 405 is configured to read the first write data request after adding the first number from the cache, and write the memory to the memory.
  • each unit in the program 632 For the specific implementation of each unit in the program 632, reference may be made to the corresponding units in the embodiment shown in FIG. 4, and details are not described herein.
  • the device embodiments described above are merely illustrative, and the illustrated components may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the modules may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • the connection relationship between the modules indicates that there is a communication connection therebetween, and specifically, one or more communication buses or signal lines can be realized. Those of ordinary skill in the art can understand and implement without any creative effort.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, dedicated hardware, dedicated CPU, dedicated memory, dedicated memory, Special components and so on.
  • functions performed by computer programs can be easily implemented with the corresponding hardware.
  • the specific hardware structure used to implement the same function can be various, such as analog circuits, digital circuits, or dedicated circuits. Circuits, etc.
  • software program implementation is a better implementation in more cases.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • U disk U disk
  • mobile hard disk read-only memory (ROM, Read-Only Memory).
  • RAM Random Access Memory
  • disk or CD etc., including a number of instructions to make a computer device (can be a personal computer, server, or network device, etc.)
  • the methods described in various embodiments of the invention are performed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Procédé d'écriture de données et dispositif de stockage. Le procédé d'écriture de données est appliqué au dispositif de stockage. Le dispositif de stockage comporte un contrôleur et une mémoire. Le contrôleur comporte un processeur et une antémémoire. Le procédé comporte les étapes consistant à: faire recevoir par le contrôleur au moins une demande d'écriture de données envoyée par un hôte; ajouter un premier numéro de série à la demande d'écriture de données, le premier numéro de série étant une valeur initiale de TP; écrire la demande d'écriture de données complétée par le premier numéro de série dans une antémémoire; modifier la valeur initiale de TP lorsqu'un instantané est activé, et marquer une demande subséquente d'écriture de données en utilisant la valeur initiale de TP modifiée; et lire la demande d'écriture de données complétée par le premier numéro de série à partir de l'antémémoire, et écrire la demande d'écriture de données complétée par le premier numéro de série dans la mémoire. Le procédé est susceptible d'améliorer le rendement d'écriture de données, et peut empêcher une demande d'écriture de données, écrite dans l'antémémoire après que l'instantané a été activé, d'écraser une demande d'écriture de données écrite dans l'antémémoire avant que l'instantané ne soit activé.
PCT/CN2014/080477 2013-09-10 2014-06-23 Procédé d'écriture de données et dispositif de stockage WO2015035814A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310410758.8 2013-09-10
CN201310410758.8A CN103488431A (zh) 2013-09-10 2013-09-10 一种写数据方法及存储设备

Publications (1)

Publication Number Publication Date
WO2015035814A1 true WO2015035814A1 (fr) 2015-03-19

Family

ID=49828700

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080477 WO2015035814A1 (fr) 2013-09-10 2014-06-23 Procédé d'écriture de données et dispositif de stockage

Country Status (2)

Country Link
CN (1) CN103488431A (fr)
WO (1) WO2015035814A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3796173A4 (fr) * 2018-07-05 2021-08-04 Huawei Technologies Co., Ltd. Procédé d'écriture de données et système de stockage

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488431A (zh) * 2013-09-10 2014-01-01 华为技术有限公司 一种写数据方法及存储设备
CN104461936B (zh) * 2014-11-28 2017-10-17 华为技术有限公司 缓存数据的刷盘方法及装置
CN106796545A (zh) * 2014-12-28 2017-05-31 斯特拉托斯卡莱有限公司 分布式存储系统中的恢复同步
CN106250322B (zh) * 2016-08-12 2019-11-19 华为技术有限公司 一种写数据的方法和装置
CN110647476B (zh) * 2019-09-29 2021-10-15 苏州浪潮智能科技有限公司 一种固态硬盘写数据的方法、装置、设备及存储介质
CN114697351B (zh) * 2020-12-30 2023-03-10 华为技术有限公司 一种存储管理方法、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090210458A1 (en) * 2008-02-19 2009-08-20 Oracle International Corp. Tag based backup and recovery
CN101526925A (zh) * 2009-04-15 2009-09-09 成都市华为赛门铁克科技有限公司 一种缓存数据的处理方法及数据存储系统
CN103488431A (zh) * 2013-09-10 2014-01-01 华为技术有限公司 一种写数据方法及存储设备
CN103649901A (zh) * 2013-07-26 2014-03-19 华为技术有限公司 数据发送方法、数据接收方法和存储设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090210458A1 (en) * 2008-02-19 2009-08-20 Oracle International Corp. Tag based backup and recovery
CN101526925A (zh) * 2009-04-15 2009-09-09 成都市华为赛门铁克科技有限公司 一种缓存数据的处理方法及数据存储系统
CN103649901A (zh) * 2013-07-26 2014-03-19 华为技术有限公司 数据发送方法、数据接收方法和存储设备
CN103488431A (zh) * 2013-09-10 2014-01-01 华为技术有限公司 一种写数据方法及存储设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3796173A4 (fr) * 2018-07-05 2021-08-04 Huawei Technologies Co., Ltd. Procédé d'écriture de données et système de stockage
US11500741B2 (en) 2018-07-05 2022-11-15 Huawei Technologies Co., Ltd. Data write method and storage system

Also Published As

Publication number Publication date
CN103488431A (zh) 2014-01-01

Similar Documents

Publication Publication Date Title
US10324843B1 (en) System and method for cache management
WO2015035814A1 (fr) Procédé d'écriture de données et dispositif de stockage
US9135119B1 (en) System and method for data management
US8627012B1 (en) System and method for improving cache performance
US9405684B1 (en) System and method for cache management
US8904061B1 (en) Managing storage operations in a server cache
US9134914B1 (en) Deduplication
US9916244B1 (en) Techniques for maintaining cache coherence by atomically processing groups of storage commands
EP2879040B1 (fr) Procédé de stockage de données, appareil de stockage de données, et dispositif de stockage
US8738857B1 (en) System and method for improving cache performance
US9354907B1 (en) Optimized restore of virtual machine and virtual disk data
WO2015010327A1 (fr) Procédé d'envoi de données, procédé de réception de données et dispositif de stockage
US8555009B1 (en) Method and apparatus for enabling and managing application input/output activity while restoring a data store
WO2014079028A1 (fr) Procédé de traitement de données et dispositif de stockage
US20130111103A1 (en) High-speed synchronous writes to persistent storage
WO2018120844A1 (fr) Procédé et dispositif de sauvegarde de données différentielles
US20190317925A1 (en) Quick initialization of data regions in a distributed storage system
WO2014190501A1 (fr) Procédé de récupération de données, dispositif de stockage et système de stockage
US8738858B1 (en) System and method for improving cache performance
US10983930B1 (en) Efficient non-transparent bridge (NTB) based data transport
US11347395B2 (en) Cache management system and method
US9336157B1 (en) System and method for improving cache performance
CN110825559A (zh) 一种数据处理方法及设备
US9229814B2 (en) Data error recovery for a storage device
US8554954B1 (en) System and method for improving cache performance

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: 14844904

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14844904

Country of ref document: EP

Kind code of ref document: A1