Data Operation Method and Device
First Claim
1. A data operation method, wherein each storage device stores one strip of a data stripe, the method comprising:
- sending, by a client, a first message to a storage device corresponding to a data strip that does not need to be modified, wherein the first message carries a new version number and an old version number of the data strip that does not need to be modified;
receiving, by the storage device, the first message;
comparing the old version number in the first message with a version number of the data strip in the storage device;
updating, by the storage device, the version number of the data strip in the storage device according to the new version number in the first message when the old version number in the first message is consistent with the version number of the data strip in the storage device;
sending, by the storage device to the client, a second message indicating a version number mismatch when the old version number in the first message is inconsistent with the version number of the data strip in the storage device;
sending, by the client to the storage device that sends the second message after receiving the second message, a data strip corresponding to the storage device and a version number of the data strip corresponding to the storage device;
storing, by the storage device, a received data strip; and
performing a version number update with respect to the received data strip.
2 Assignments
0 Petitions
Accused Products
Abstract
A data operation method and device, relate to the storage field is presented. The data operation method and device can implement, during modification of a data strip in a storage device, data sending and receiving performed only for a storage device that requires modification. Other irrelevant storage devices do not consume a disk throughput and traffic, thereby reducing a disk throughput and usage of a network resource, that is, reducing a write penalty. A client sends both new and old version numbers to a storage device corresponding to a data strip that does not need to be modified, so that the corresponding storage device compares a version number of the data strip stored by the storage device with the old version number sent by the client. When the two version numbers are consistent, the version number in the storage device is updated to the received new version number.
9 Citations
6 Claims
-
1. A data operation method, wherein each storage device stores one strip of a data stripe, the method comprising:
-
sending, by a client, a first message to a storage device corresponding to a data strip that does not need to be modified, wherein the first message carries a new version number and an old version number of the data strip that does not need to be modified; receiving, by the storage device, the first message; comparing the old version number in the first message with a version number of the data strip in the storage device; updating, by the storage device, the version number of the data strip in the storage device according to the new version number in the first message when the old version number in the first message is consistent with the version number of the data strip in the storage device; sending, by the storage device to the client, a second message indicating a version number mismatch when the old version number in the first message is inconsistent with the version number of the data strip in the storage device; sending, by the client to the storage device that sends the second message after receiving the second message, a data strip corresponding to the storage device and a version number of the data strip corresponding to the storage device; storing, by the storage device, a received data strip; and performing a version number update with respect to the received data strip. - View Dependent Claims (2, 3)
-
-
4. A data operation system comprising:
-
a data operation device; and a plurality of storage devices, wherein each storage device stores one strip of a data strip, wherein the data operation device is configured to send a first message to storage device corresponding to a data strip that does not need to be modified, and wherein the first message carries a new version number and an old version number of the data strip that does not need to be modified; wherein the storage device is configured to; receive the first message, and compare the old version number in the first message with a version number of the data strip in the storage device; and update the version number of the data strip in the storage device according to the new version number in the first message when the old version number in the first message is consistent with the version number of the data strip in the storage device; and send a second message indicating a version number mismatch to the data operation device when the old version number in the first message is inconsistent with the version number of the data strip in the storage device; wherein the data operation device is further configured to; send a data strip corresponding to the storage device to the storage device that sends the second message after receiving the second message; and send a version number of the data strip corresponding to the storage device, and wherein the storage device is further configured to store a received data strip and perform a version number update with respect to the received data strip. - View Dependent Claims (5, 6)
-
Specification