Subject: SAMSUNG MZ7LN512HCHP-000L1 & incorrect DB parsing
From: Ivan Pozdeev <[email-masked]>
To: [email-masked]
Date: Wed, 5 Jul 2017 03:56:31 +0400 (MSK)

249 is the number of gigabytes written to NAND.

No references found, I just guessed it from another DB entry with the same number and
the value's dynamic when testing a brand-new drive (it went from 0 to 3, then to 5 when I performed yet another write test that writes ~1GiB of data).

Last but not the least, drivedb.h parser in Smartctl 6.5 turns out to ignore the lines
that have the // comment, even if it's not the first token in the line.
That's why there are so many unknown attributes in the output.
I reported it at <ticket URL not yet known>.

-- 
--
With best regards,
Ivan Pozdeev

--- drivedb.h_	2017-07-04 04:28:07.421875000 +0300
+++ drivedb.h	2017-07-05 01:27:55.453125000 +0300
@@ -1282,11 +1282,11 @@
   //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
   //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
-    "-v 170,raw48,Unused_Rsvd_Blk_Ct_Chip " // CM871
-    "-v 171,raw48,Program_Fail_Count_Chip " // CM871
-    "-v 172,raw48,Erase_Fail_Count_Chip " // CM871
-    "-v 173,raw48,Wear_Leveling_Count " // CM871
-    "-v 174,raw48,Unexpect_Power_Loss_Ct " // CM871
+    "-v 170,raw48,Unused_Rsvd_Blk_Ct_Chip "
+    "-v 171,raw48,Program_Fail_Count_Chip "
+    "-v 172,raw48,Erase_Fail_Count_Chip "
+    "-v 173,raw48,Wear_Leveling_Count "
+    "-v 174,raw48,Unexpect_Power_Loss_Ct "
   //"-v 175,raw48,Program_Fail_Count_Chip "
   //"-v 176,raw48,Erase_Fail_Count_Chip "
   //"-v 177,raw48,Wear_Leveling_Count "
@@ -1299,7 +1299,7 @@
   //"-v 184,raw48,End-to-End_Error " // SM843T Series
     "-v 187,raw48,Uncorrectable_Error_Cnt "
   //"-v 190,tempminmax,Airflow_Temperature_Cel "  // seems to be some sort of temperature value for 470 Series?
-    "-v 191,raw48,Unknown_Samsung_Attr " // PM810
+    "-v 191,raw48,Unknown_Samsung_Attr "
   //"-v 194,tempminmax,Temperature_Celsius "
     "-v 195,raw48,ECC_Error_Rate "
   //"-v 196,raw16(raw16),Reallocated_Event_Count "
@@ -1308,21 +1308,21 @@
     "-v 201,raw48,Supercap_Status "
     "-v 202,raw48,Exception_Mode_Status "
   //"-v 233,raw48,Media_Wearout_Indicator // PM851, 840
-    "-v 234,raw48,Unknown_Samsung_Attr " // PM851, 840
-    "-v 235,raw48,POR_Recovery_Count " // PM851, 830/840/850
-    "-v 236,raw48,Unknown_Samsung_Attr " // PM851, 840
-    "-v 237,raw48,Unknown_Samsung_Attr " // PM851, 840
-    "-v 238,raw48,Unknown_Samsung_Attr " // PM851, 840
+    "-v 234,raw48,Unknown_Samsung_Attr "
+    "-v 235,raw48,POR_Recovery_Count "
+    "-v 236,raw48,Unknown_Samsung_Attr "
+    "-v 237,raw48,Unknown_Samsung_Attr "
+    "-v 238,raw48,Unknown_Samsung_Attr "
   //"-v 241,raw48,Total_LBAs_Written "
   //"-v 242,raw48,Total_LBAs_Read " // PM851, SM841N
-    "-v 243,raw48,SATA_Downshift_Ct " // PM863
-    "-v 244,raw48,Thermal_Throttle_St " // PM863
-    "-v 245,raw48,Timed_Workld_Media_Wear " // PM863
-    "-v 246,raw48,Timed_Workld_RdWr_Ratio " // PM863
-    "-v 247,raw48,Timed_Workld_Timer " // PM863
-    "-v 249,raw48,Unknown_Samsung_Attr " // CM871a
-    "-v 250,raw48,SATA_Iface_Downshift " // from the spec
-    "-v 251,raw48,NAND_Writes" // PM863
+    "-v 243,raw48,SATA_Downshift_Ct "
+    "-v 244,raw48,Thermal_Throttle_St "
+    "-v 245,raw48,Timed_Workld_Media_Wear "
+    "-v 246,raw48,Timed_Workld_RdWr_Ratio "
+    "-v 247,raw48,Timed_Workld_Timer "
+    "-v 249,raw48,NAND_Writes_1GiB"
+    "-v 250,raw48,SATA_Iface_Downshift "
+    "-v 251,raw48,NAND_Writes"
   },
   { "Marvell based SanDisk SSDs",
     "SanDisk SD5SG2[0-9]*G1052E|" // X100 (88SS9174), tested with SanDisk SD5SG2256G1052E/10.04.01