Storage device with adaptive error-correcting code for improved areal efficiency
View Patent ↗A method for adaptively applying an error-correcting code to a storage device is disclosed. A determination is made that a system is in an idle state of input/output requests. First data symbols are copied into a first location within a buffer. First data symbol errors corrected using a first error-correcting code. Second data symbols including corrected bits are written in a second location on the recording media with a second error-correcting code. An error number for the second data symbols in the second location is determined. If the error number is below a first threshold error number, the first data symbols are deleted. If the error number is above the first threshold error number, the second data symbols are deleted.
1. A system comprising:
a recording media capable of storing data;
a processor configured to:
determine that the system is in an idle state of input/output requests;
copy first data symbols from a location of the recording media;
correct the first data symbols using a first error-correcting code;
write second data symbols including the corrected first data symbols to the location on the recording media with a second error-correcting code;
determine an error number for the second data symbols;
compare the error number to a threshold; and
based on the comparison, record the second error-correction code or alternately keep the first error-correction code.
2. The system of claim 1 wherein the first data symbols are written with a weaker error-correcting code and the second data symbols are written with a stronger error-correcting code.
3. The system of claim 1 wherein the first data symbols are written with a stronger error-correcting code and the second data symbols are written with a weaker error-correcting code.
4. The system of claim 1 wherein the recording media is a flash memory.
5. The system of claim 1 wherein the processor is further configured to:
create a desired writing of the first data symbols by encoding the first data based on the first error-correcting code.
6. A method comprising:
determining that a processor is in an idle state of input/output requests;
determining that a first error number for first data written on a recording disk with a strong error-correcting code is above a first threshold error number;
determining a set of bits based on the first data and the strong error-correcting code;
writing the set of bits to the recording disk by applying a first phase shift to a write control signal;
reading second data from the recording disk, the second data being the read written set of bits;
comparing the second data to the set of bits;
determining a second error number for the second data;
comparing the second error number to a second threshold error number; and
based on the comparing:
writing the second data to the recording disk with a first error-correcting code; and
freeing a region of the recording disk storing the strong error-correcting code.
7. The method of claim 6 wherein a timing of a magnetic field generated by a magnetic write head is controlled by the write control signal.
8. The method of claim 6 wherein a timing of the light from a light source used for heating the disk is controlled by the write control signal.
9. The method of claim 6 wherein the first error-correcting code requires less bits than the strong error-correcting code on the recording disk.
10. The method of claim 6 wherein the recording disk is a magnetic hard disk.
11. The method of claim 6 wherein the recording disk is a patterned magnetic hard disk.
12. The method of claim 6 wherein the recording disk is a thermally assisted recording magnetic disk.
13. The method of claim 6 wherein the recording disk is an optical disk.
14. The method of claim 6 further comprising:
creating the desired writing of the first data by encoding the first data based on the strong error-correcting code.
15. The method of claim 6 further comprising:
compacting the first data written on the recording hard disk in response to writing the second data with the first error-correcting code.
16. The method of claim 6 further comprising:
storing information on the recording disk indicating sectors of the recording disk that have been compacted.
17. The method of claim 6 further comprising:
rewriting the set of bits to the recording disk applying a second phase shift to the write control signal;
reading third data from the recording disk, the third data being the read rewritten set of bits; and
comparing the third data to the set of bits.
18. A non-transitory computer readable medium comprising a plurality of instructions to manipulate a processor, the plurality of instructions comprising:
instructions to determine that a processor is in an idle state of input/output requests;
instructions to determine that a first error number for first data written on a magnetic hard disk with a strong error-correcting code is above a first threshold error number;
instructions to determine a set of bits based on the first data and the strong error-correcting code;
instructions to write the set of bits to the recording disk by apply a first phase shift to a write control signal;
instructions to read second data from the recording disk, the second data being the read written set of bits;
instructions to compare the second data to the set of bits;
instructions to determine a second error number for the second data;
instructions to compare the second error number to a second threshold error number; and
instructions to write the second data to the magnetic hard disk with a first weak error-correcting code in response to the comparing.
19. The computer readable medium of claim 18 wherein the first weak error-correcting code requires less bits than the strong error-correcting code on the magnetic hard disk.
20. The computer readable medium of claim 18 wherein the magnetic hard disk is a patterned magnetic hard disk.
21. The computer readable medium of claim 18 further comprising:
instructions to determine an offset margin for the first phase shift; and
instructions to delete the strong error-correcting code data on the magnetic hard disk.
22. The computer readable medium of claim 21 wherein the offset margin is a number of phase shifts that provide a corrected bit in the second data.
23. The computer readable medium of claim 18 further comprising:
instructions to compact the first data written on the magnetic hard disk in response to writing the second data with the weak error-correcting code.
24. The computer readable medium of claim 18 wherein the first phase shift is varied on a bit by bit basis.