Method for backing up data in a case of power failure of storage system, and storage system controller
First Claim
1. A method for backing up data in a case of a power failure of a storage system, the method comprising:
- when a power failure is detected, acquiring current refresh progress of a buffer in a storage system, an address of data that is in the buffer which needs to be backed up to a non-volatile memory in the storage system, and a first time required for backing up the data;
calculating, according to the current refresh progress of the buffer and the address of the data in the buffer, a second time for which the data can at least keep being not lost since a last refresh; and
stopping refreshing the buffer, and backing up the data to the non-volatile memory, when the second time is greater than the first time;
wherein acquiring current refresh progress of a buffer in a storage system comprises;
acquiring, from a counter, the current refresh progress of the buffer in the storage system, wherein the current refresh progress is a current count value of the counter and the count value of the counter increases according to a set value each time a refresh command is sent to the buffer.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention discloses a method for backing up data in a case of a power failure of a storage system including: when a power failure is detected, acquiring current refresh progress of a buffer in a storage system, an address, in the buffer, of data that is in the buffer and needs to be backed up to a non-volatile memory in the storage system, and a first time required for backing up the data; calculating, according to the current refresh progress of the buffer and the address of the data in the buffer, a second time for which the data can at least keep being not lost since a last refresh; and stopping refreshing the buffer, and backing up the data to the non-volatile memory, if the second time is greater than the first time.
-
Citations
10 Claims
-
1. A method for backing up data in a case of a power failure of a storage system, the method comprising:
-
when a power failure is detected, acquiring current refresh progress of a buffer in a storage system, an address of data that is in the buffer which needs to be backed up to a non-volatile memory in the storage system, and a first time required for backing up the data; calculating, according to the current refresh progress of the buffer and the address of the data in the buffer, a second time for which the data can at least keep being not lost since a last refresh; and stopping refreshing the buffer, and backing up the data to the non-volatile memory, when the second time is greater than the first time; wherein acquiring current refresh progress of a buffer in a storage system comprises; acquiring, from a counter, the current refresh progress of the buffer in the storage system, wherein the current refresh progress is a current count value of the counter and the count value of the counter increases according to a set value each time a refresh command is sent to the buffer.
-
-
2. A method for backing up data in a case of a power failure of a storage system, the method comprising:
-
when a power failure is detected, acquiring current refresh progress of a buffer in a storage system, an address of data that is in the buffer which needs to be backed up to a non-volatile memory in the storage system, and a first time required for backing up the data; calculating, according to the current refresh progress of the buffer and the address of the data in the buffer, a second time for which the data can at least keep being not lost since a last refresh; and stopping refreshing the buffer, and backing up the data to the non-volatile memory, when the second time is greater than the first time; wherein calculating, according to the current refresh progress of the buffer and the address of the data in the buffer, a second time for which the data can at least keep being not lost since a last refresh comprises; when a minimum row number p1 of the data in the buffer is greater than or equal to a row number p of the buffer corresponding to the current refresh progress, calculating the second time t1=T1−
[T2−
(p1−
p)*Δ
] for which the data can at least keep being not lost since the last refresh, wherein T1 is maximum time for which any row of data can keep after a refresh, T2 is a period for which a refresh is performed on the buffer, an interval at which two adjacent rows are refreshed Δ
=T2/M, and M is the total number of rows in the buffer. - View Dependent Claims (3, 4, 5)
-
-
6. A storage system controller, comprising:
-
an acquiring unit, configured to;
when a power failure is detected, acquire current refresh progress of a buffer in a storage system, an address of data that is in the buffer which needs to be backed up to a non-volatile memory in the storage system, and a first time required for backing up the data;a calculating unit, configured to calculate, according to the current refresh progress of the buffer and the address of the data in the buffer, a second time for which the data can at least keep being not lost since a last refresh; a refreshing unit, configured to stop refreshing the buffer when the second time is greater than the first time; and a backup unit, configured to back up the data to the non-volatile memory; wherein the acquiring unit is configured to acquire, from a counter, the current refresh progress of the buffer in the storage system, wherein the current refresh progress is a current count value of the counter and the count value of the counter increases according to a set value each time a refresh command is sent to the buffer.
-
-
7. A storage system controller, comprising:
-
an acquiring unit, configured to;
when a power failure is detected, acquire current refresh progress of a buffer in a storage system, an address of data that is in the buffer which needs to be backed up to a non-volatile memory in the storage system, and a first time required for backing up the data;a calculating unit, configured to calculate, according to the current refresh progress of the buffer and the address of the data in the buffer, a second time for which the data can at least keep being not lost since a last refresh; a refreshing unit, configured to stop refreshing the buffer when the second time is greater than the first time; and a backup unit, configured to back up the data to the non-volatile memory; wherein the calculating unit is configured to; when a minimum row number p1 of the data in the buffer is greater than or equal to a row number p of the buffer corresponding to the current refresh progress, calculate the second time t1=T1−
[T2−
(p1−
p)*Δ
] for which the data can at least keep being not lost since the last refresh, wherein T1 is maximum time for which any row of data can keep after a refresh, T2 is a period for which a refresh is performed on the buffer, an interval at which two adjacent rows are refreshed Δ
=T2/M, and M is the total number of rows in the buffer. - View Dependent Claims (8, 9, 10)
-
Specification