IP Library Granted Patent US 9,081,508
Granted Patent B2
US 9,081,508 · App. 14/567,588 · Granted Jul 14, 2015

File processing method and storage device

Inventors: Han Kong (Chengdu, CN); Jing Wang (Chengdu, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F3/0625G06F3/0643G06F3/0689
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,081,508
App. No.
14/567,588
Granted
Jul 14, 2015
Kind
B2
Abstract

A file processing method and a storage device are disclosed. In the method, a storage device receives T files that are to be stored in the RAID, and determines a sequence number of a check block in a stripe of the RAID. The storage device repeatedly obtains a data block of the K th file in the T files as the K th data block in the stripe, where a value of K progressively increases from 1 to T, and the value of K is not equal to the sequence number of the check block in the stripe. After computing the check block according to data blocks, the storage device writes, into the T disks, the data blocks and the obtained check block in the stripe. By using the foregoing method, one file can be written into one disk of the RAID while ensuring security of file storage.

Claims (48)

1. A file processing method performed by a storage device for storing a file in a redundant array of independent disks (RAID), comprising:

receiving T files that are to be stored in the RAID, wherein a value of the T is no less than 3, and the value of the T is equal to the number of disks that form the RAID;

determining a sequence number of a check block in a stripe of the RAID;

repeatedly obtaining a data block, to be written into a disk, of the K th file in the T files as the K th data block in the stripe, wherein a value of K progressively increases from 1 to T, and the value of K is not equal to the sequence number of the check block in the stripe;

computing the check block in the stripe according to data blocks in the stripe; and

writing, into the T disks, the data blocks in the stripe and the obtained check block in the stripe, wherein each block is written into one disk.

2. The file processing method according to claim 1 , further comprising:

when the K th file has no data block to be written into the RAID, determining whether other files except the T files are received;

if the other files are received, selecting a file from the received other files; and

using a data block, to be written into a disk, in the selected file as the K th data block in the stripe.

3. The file processing method according to claim 1 , further comprising:

when the K th file has no data block to be written into a disk, if other files except the T files are not received, filling the K th data block in the stripe with 0s.

4. A method performed by a storage device for storing a file in a redundant array of independent disks RAID, wherein the RAID comprises D data disks and P independent check disks, a value of the D is no less than 2, and a value of the P is no less than 1; and the method comprises:

receiving D files that are to be stored in the RAID;

repeatedly obtaining a data block, to be written into a data disk, of the K th file in the D files as a data block that is in a stripe of the RAID and is to be stored in the K th data disk, wherein a value of K progressively increases from 1 to D;

computing P check blocks in the stripe according to the obtained D data blocks; and

writing the D data blocks into the D data disks, and writing the P check blocks into the P independent check disks, wherein each block is written into one disk.

5. The method according to claim 4 , further comprising:

when the K th file has no data block to be written into a data disk, determining whether other files except the D files are received;

if the other files are received, selecting a file from the received other files; and

using a data block, to be written into a disk, in the selected file as a data block that is in the stripe and is to be stored in the K th data disk.

6. The method according to claim 4 , further comprising:

when the K th file has no data block to be written into a data disk, if other files except the D files are not received, filling the data block that is in the stripe and is to be stored in the K th data disk with 0s.

7. A storage device, comprising:

a redundant array of independent disks RAID, configured to store a file, and the RAID comprises T disks, wherein a value of the T is no less than 3; a communication interface, configured to communicate with a host and the RAID; and

a processor, configured to receive T files that are to be stored in the RAID;

determine a sequence number of a check block in a stripe of the RAID;

repeatedly obtain a data block, to be written into a disk, of the K th file in the T files as the K th data block in the stripe, wherein a value of K progressively increases from 1 to T, and the value of K is not equal to the sequence number of the check block in the stripe;

compute the check block in the stripe according to data blocks in the stripe; and

write, into the T disks, the data blocks in the stripe and the obtained check block in the stripe, wherein each block is written into one disk.

8. The storage device according to claim 7 , wherein the processor is further configured to:

when the K th file has no data block to be written into a disk, determine whether other files except the T files are received;

if the other files are received, select a file from the received other files; and

use a data block, to be written into a disk, in the selected file as the K th data block in the stripe.

9. The storage device according to claim 7 , wherein the processor is further configured to:

when the K th file has no data block to be written into a disk, if other files except the T files are not received, fill the K th data block in the stripe with 0s.

10. A storage device, comprising:

a redundant array of independent disks RAID, configured to store a file, wherein the RAID comprises D data disks and P independent check disks, a value of the D is no less than 2, and a value of the P is no less than 1; a communication interface, configured to communicate with a host and the RAID; and

a processor, configured to receive D files that are to be stored in the RAID;

repeatedly obtain a data block, to be written into a data disk, of the K th file in the D files as a data block that is in a stripe of the RAID and is to be stored in the K th data disk, wherein a value of K progressively increases from 1 to D;

compute P check blocks in the stripe according to the obtained D data blocks; and

write the D data blocks into the D data disks, and write the P check blocks into the P independent check disks, wherein each block is written into one disk.

11. The storage device according to claim 10 , wherein the processor is further configured to:

when the K th file has no data block to be written into a data disk, determine whether other files except the D files are received;

if the other files are received, select a file from the received other files; and

use a data block, to be written into a disk, in the selected file as a data block that is in the stripe and is to be stored in the K th data disk.

12. The storage device according to claim 10 , wherein the processor is further configured to:

when the K th file has no data block to be written into a data disk, if other files except the D files are not received, fill the data block that is in the stripe and is to be stored in the K th data disk with 0s.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2022
From: HUAWEI TECHNOLOGIES CO., LTD.
To: XFUSION DIGITAL TECHNOLOGIES CO., LTD.
Reel/Frame 058682/0312 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 11, 2014
From: KONG, HAN; WANG, JING
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 034482/0304 →
Continuity (2)
Continuation PCTCN2013081172 · Aug 9, 2013
Related Publication 20150095573A1 · Apr 2, 2015