Skip to content

Commit 33be287

Browse files
committed
smart: Use drive self-assessment as an overall status
The libatasmart attribute overall status differs slightly from the drive SMART self-assessment and is very sensitive for particular status values. Such status should fit more like a pre-fail warning, no reason to fail hard the global assessment. Even a single reallocated sector would cause a warning, while the drive could be quite healthy otherwise.
1 parent 5730aa8 commit 33be287

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/plugins/smart/libatasmart.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ static void parse_attr_cb (G_GNUC_UNUSED SkDisk *d,
240240
static BDSmartATA * parse_sk_data (SkDisk *d, GError **error) {
241241
SkBool good = FALSE;
242242
SkBool available = FALSE;
243-
SkSmartOverall overall = SK_SMART_OVERALL_GOOD;
244243
uint64_t power_on_msec = 0;
245244
const SkSmartParsedData *parsed_data;
246245
BDSmartATA *data;
@@ -276,9 +275,7 @@ static BDSmartATA * parse_sk_data (SkDisk *d, GError **error) {
276275
* sk_disk_smart_read_data() would've already returned an error.
277276
*/
278277
data->smart_enabled = TRUE;
279-
280-
sk_disk_smart_get_overall (d, &overall);
281-
data->overall_status_passed = overall == SK_SMART_OVERALL_GOOD;
278+
data->overall_status_passed = good;
282279

283280
switch (parsed_data->offline_data_collection_status) {
284281
case SK_SMART_OFFLINE_DATA_COLLECTION_STATUS_NEVER:

0 commit comments

Comments
 (0)