Storage device, control device, and error reporting method
A storage device performs a reading process or a writing process based on a command received from an upper-level device, and when an error occurs in the reading process or the writing process, generates a predetermined sense according to a result of a retry, and reports the predetermined sense to the upper-level device. A time measuring unit measures a remedying time that is required to remedy the error in execution of the command by a hidden retry that is executed as a sort of the retry. A time determining unit determines whether the remedying time measured by the time measuring unit exceeds a predetermined time threshold.
1 . A storage device that performs a reading process or a writing process based on a command received from an upper-level device, and when an error occurs in the reading process or the writing process, generates a predetermined sense according to a result of a retry, and reports the predetermined sense to the upper-level device, the storage device comprising:
a time measuring unit that measures a remedying time that is required to remedy the error in execution of the command by a hidden retry that is executed as a sort of the retry; and
a time determining unit that determines whether the remedying time measured by the time measuring unit exceeds a predetermined time threshold.
2 . The storage device according to claim 1 , further comprising:
a warning unit that performs, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, a warning indicating that the hidden retry is occurring frequently for the command, to the upper-level device.
3 . The storage device according to claim 1 , further comprising:
a sector switching unit that automatically switches, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, a sector within a request range of the command.
4 . The storage device according to claim 3 , further comprising:
a checking unit that checks, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, whether a reading error occurs, for each sector within the request range of the command, wherein
the sector switching unit automatically switches the sector that is checked by the checking unit and determined to have the reading error.
5 . The storage device according to claim 1 , further comprising:
a command control unit that aborts, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, the command that is received from the upper-level device and that is being executed, and executes other command.
6 . The storage device according to claim 1 , further comprising:
a threshold setting unit that calculates automatically, when the command is received from the upper-level device, a first value based on a content of the command, and sets the calculated first value as the predetermined time threshold, wherein
the time determining unit determines whether the remedying time exceeds the predetermined time threshold set by the threshold setting unit.
7 . The storage device according to claim 6 , wherein
the threshold setting unit sets a second value that is obtained by multiplying a total time for which an attempt of the retry is permitted by a predetermined proportion, as the predetermined time threshold.
8 . The storage device according to claim 6 , wherein
the threshold setting unit sets a second value that is obtained by multiplying the first value by a predetermined proportion, as the predetermined time threshold.
9 . A control device for a storage device that performs a reading process or a writing process based on a command received from an upper-level device, and when an error occurs in the reading process or the writing process, generates a predetermined sense according to a result of a retry, and reports the predetermined sense to the upper-level device, the control device comprising:
a time measuring unit that measures a remedying time that is required to remedy the error in execution of the command by a hidden retry that is executed as a sort of the retry; and
a time determining unit that determines whether the remedying time measured by the time measuring unit exceeds a predetermined time threshold.
10 . The control device according to claim 9 , further comprising:
a warning unit that performs, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, a warning indicating that the hidden retry is occurring frequently for the command, to the upper-level device.
11 . The control device according to claim 9 , further comprising:
a sector switching unit that automatically switches, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, a sector within a request range of the command.
12 . The control device according to claim 11 , further comprising:
a checking unit that checks, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, whether a reading error occurs, for each sector within the request range of the command, wherein
the sector switching unit automatically switches the sector that is checked by the checking unit and determined to have the reading error.
13 . The control device according to claim 9 , further comprising:
a command control unit that aborts, when the time determining unit determined that the remedying time exceeds the predetermined time threshold, the command that is received from the upper-level device and that is being executed, and executes other command.
14 . The control device according to claim 9 , further comprising:
a threshold setting unit that calculates automatically, when the command is received from the upper-level device, a first value based on a content of the command, and sets the calculated first value as the predetermined time threshold, wherein
the time determining unit determines whether the remedying time exceeds the predetermined time threshold set by the threshold setting unit.
15 . The control device according to claim 14 , wherein
the threshold setting unit sets a second value that is obtained by multiplying a total time for which an attempt of the retry is permitted by a predetermined proportion, as the predetermined time threshold.
16 . The control device according to claim 14 , wherein
the threshold setting unit sets a second value that is obtained by multiplying the first value by a predetermined proportion, as the predetermined time threshold.
17 . An error reporting method for a storage device that performs a reading process or a writing process based on a command received from an upper-level device, and when an error occurs in the reading process or the writing process, generates a predetermined sense according to a result of a retry, and reports the predetermined sense to the upper-level device, the error reporting method comprising:
measuring a remedying time that is required to remedy the error in execution of the command by a hidden retry that is executed as a sort of the retry; and
determining whether the remedying time measured by the time measuring unit exceeds a predetermined time threshold.