EQUALIZING WEAR ON STORAGE DEVICES THROUGH FILE SYSTEM CONTROLS
Data stored in file blocks and storage blocks of a storage device may be tracked by the file system. The file system may track a number of writes performed to each file block and storage block. The file system may also track a state of each storage block. The file system may use information, such as the write count and the block state, to determine locations for updated data to be stored on the storage device. Placement of data by the file system allows the file system to manage wear on storage devices, such as solid state storage devices.
1 . A method, comprising:
receiving first data corresponding to an update of at least one file block;
identifying, by the file system, a storage block corresponding to the at least one file block;
writing the first data to a first storage block of a storage device.
2 . The method of claim 1 , in which the step of receiving first data comprises receiving first data corresponding to an update of a first file block, the method further comprising:
receiving second data corresponding to an update of a second file block also stored in the first storage block;
writing the first data and the second data to a first storage block of a storage device.
3 . The method of claim 2 , in which a size of the file block is smaller than a size of the storage block.
4 . The method of claim 3 , further comprising:
receiving third data corresponding to a partial update of a third file block also stored in the first storage block; and
writing the second data to the first storage block concurrently with the writing of the first data to the first storage block.
5 . The method of claim 1 , in which the first data corresponds to an update of a portion of a first file block when the first file block spans the first storage block and a second storage block.
6 . The method of claim 5 , in which a size of the file block is larger than a size of the storage block.
7 . The method of claim 1 , in which the storage device is a solid state storage device.
8 . A computer program product, comprising:
a non-transitory computer-readable medium comprising:
code to receive first data corresponding to an update of at least one file block;
code to identify, by the file system, a storage block corresponding to the at least one file block;
code to write the first data to a first storage block of a storage device.
9 . The computer program product of claim 8 , in which the medium further comprises:
code to receive first data corresponding to an update of a first file block;
code to receive second data corresponding to an update of a second file block also stored in the first storage block;
code to write the first data and the second data to a first storage block of a storage device.
10 . The computer program product of claim 9 , in which a size of the file block is smaller than a size of the storage block.
11 . The computer program product of claim 10 , in which the medium further comprises:
code to receive third data corresponding to a partial update of a third file block also stored in the first storage block; and
code to write the third data to the first storage block concurrently with the writing of the first and second data to the first storage block.
12 . The computer program product of claim 8 , in which the first data corresponds to an update of a portion of a first file block when the first file block spans the first storage block and a second storage block.
13 . The computer program product of claim 12 , in which a size of the file block is larger than a size of the storage block.
14 . An apparatus, comprising:
a memory;
a plurality of storage devices; and
a processor coupled to the memory and the plurality of storage devices, in which the processor is configured:
to receive first data corresponding to an update of at least one file block;
to identify, by the file system, a storage block corresponding to the at least one file block; and
to write the first data to a first storage block of a storage device.
15 . The apparatus of claim 14 , in which the processor is further configured:
to receive first data corresponding to an update of a first file block;
to receive second data corresponding to an update of a second file block also stored in the first storage block;
to write the first data and the second data to a first storage block of a storage device.
16 . The apparatus of claim 15 , in which a size of the file block is smaller than a size of the storage block.
17 . The apparatus of claim 16 , in which the processor is further configured:
to receive third data corresponding to a partial update of a second file block also stored in the first storage block; and
to write the third data to the first storage block concurrently with the writing of the first and second data to the first storage block.
18 . The apparatus of claim 14 , in which the first data corresponds to an update of a portion of a first file block when the first file block spans the first storage block and a second storage block.
19 . The apparatus of claim 18 , in which a size of the file block is larger than a size of the storage block.
20 . The apparatus of claim 14 , in which the plurality of storage devices comprise a plurality of solid state devices (SSDs).