From a02ea3da769f5d77cd0e6d572f078ca28f3c6a7c Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 28 Jan 2015 19:36:45 +0100 Subject: [PATCH] Use the midpoint from Backblaze stats --- cmdline/device.c | 68 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/cmdline/device.c b/cmdline/device.c index 1bef7933..e8c36465 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -32,65 +32,71 @@ struct afr_point { double afr; /**< Annual Failure Rate at this value. */ }; +/* Smart 5: Reallocated_Sector_Ct (Raw Value) */ static struct afr_point AFR_5[] = { { 0, 0 }, - { 1, 0.0274 }, - { 4, 0.0750 }, - { 16, 0.235 }, - { 70, 0.361 }, - { 260, 0.567 }, - { 1100, 1.50 }, - { 4500, 2.06 }, - { 17000, 1.77 }, + { (1+4)/2, 0.0274 }, + { (4+16)/2, 0.0750 }, + { (16+70)/2, 0.235 }, + { (70+260)/2, 0.361 }, + { (260+1100)/2, 0.567 }, + { (1100+4500)/2, 1.50 }, + { (4500+17000)/2, 2.06 }, + { (17000+70000)/2, 1.77 }, { 0, 0 } }; +/* Smart 187: Reported_Uncorrect (Raw Value) */ static struct afr_point AFR_187[] = { { 0, 0 }, { 1, 0.338 }, - { 3, 0.501 }, - { 11, 0.534 }, - { 20, 0.842 }, - { 35, 1.44 }, - { 65, 1.61 }, + { (3+6)/2, 0.501 }, + { (11+20)/2, 0.534 }, + { (20+35)/2, 0.842 }, + { (35+65)/2, 1.44 }, + { (65+120)/2, 1.61 }, { 0, 0 } }; +/* Smart 188: Command_Timeout (Raw Value) */ static struct afr_point AFR_188[] = { { 0, 0 }, - { 1, 0.100 }, - { 13000000000ULL, 0.334 }, - { 26000000000ULL, 0.367 }, + { (1+13000000000ULL)/2, 0.100 }, + { (13000000000ULL+26000000000ULL)/2, 0.334 }, + { (26000000000ULL+104000000000ULL)/2, 0.367 }, { 0, 0 } }; +/* Smart 193: Load_Cycle_Count (Raw Value) */ static struct afr_point AFR_193[] = { { 0, 0 }, - { 1300, 0.0248 }, - { 5500, 0.0585 }, - { 21000, 0.195 }, - { 90000, 0.267 }, + { (1300+5500)/2, 0.0248 }, + { (5500+21000)/2, 0.0585 }, + { (21000+90000)/2, 0.195 }, + { (90000+350000)/2, 0.267 }, { 0, 0 } }; +/* Smart 197: Current_Pending_Sector (Raw Value) */ static struct afr_point AFR_197[] = { { 0, 0 }, - { 1, 0.341 }, - { 2, 0.682 }, - { 16, 0.956 }, - { 40, 1.65 }, - { 100, 2.51 }, - { 250, 3.32 }, + { (1+2)/2, 0.341 }, + { (2+6)/2, 0.682 }, + { (16+40)/2, 0.956 }, + { (40+100)/2, 1.65 }, + { (100+250)/2, 2.51 }, + { (250+650)/2, 3.32 }, { 0, 0 } }; +/* Smart 198: Offline_Uncorrectable (Raw Value) */ static struct afr_point AFR_198[] = { { 0, 0 }, - { 1, 0.813 }, - { 2, 1.11 }, - { 4, 1.35 }, - { 10, 1.74 }, - { 12, 2.64 }, + { (1+2)/2, 0.813 }, + { (2+4)/2, 1.11 }, + { (4+6)/2, 1.35 }, + { (10+12)/2, 1.74 }, + { (12+14)/2, 2.64 }, { 0, 0 } };