Opened 7 years ago
Last modified 6 years ago
#870 new patch
[SAS/SCSI] Patch to support SMART attributes support for WDC SAS products
Reported by: | Akhilesh_RN | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | undecided |
Component: | smartctl | Version: | 6.5 |
Keywords: | scsi | Cc: |
Description
Please find the attached patch for adding smart attributes support WDC SAS products.
Attachments (4)
Change History (13)
by , 7 years ago
Attachment: | smart_SAS_Changes.patch added |
---|
by , 7 years ago
Attachment: | Smartmon_SAS_results.txt added |
---|
comment:1 by , 7 years ago
Component: | all → smartctl |
---|---|
Milestone: | → undecided |
Priority: | major → minor |
comment:2 by , 7 years ago
Keywords: | scsi added |
---|
by , 7 years ago
Attachment: | Sample_before.txt added |
---|
by , 7 years ago
Attachment: | Sample_after.txt added |
---|
comment:4 by , 7 years ago
The patch helps in displaying all the smart information of the drive for Sandisk(a WDC brand) SAS products. The smart information lists all the SMART attributes which are supported by the drive firmware. Please find the attached sample results for reference.
comment:5 by , 7 years ago
May be considered for inclusion in smartmontools 6.7.
Patch should be reviewed by main author of SCSI code (dpgilbert).
Some notes from compile test and and quick review:
- Compile errors/warnings (repeated messages not shown):
g++ 6.4.0 -std=gnu++03: scsiprint.cpp:2145:90: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 scsiprint.cpp:2145:90: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] clang++ 4.0.0: scsiprint.cpp:2142:40: error: expected expression cppcheck 1.81: [scsiprint.cpp:1462]: (style) The scope of the variable 'product' can be reduced. [scsiprint.cpp:1462]: (style) The scope of the variable 'revision' can be reduced. [scsiprint.cpp:2130]: (error) Memory leak: scsiSmartSetting.customerName
- Use of
calloc()
without nullptr check. Usenew
instead or better avoid it at all (seeraw_buffer
). - Misleading indentation, use of tab characters instead of blanks (see
.editorconfig
file). - Missing
static
for local functions` - Unnecessary casts
char []
tochar *
. - Missing
'\n'
in error message. - Declarations added to
ataprint.h
which are not part of function interface.
Is is assured that the new code avoids possibly unsupported SCSI commands on (non-WDC or WDC) drives which does not support these ATA-like Attributes?
comment:6 by , 7 years ago
Milestone: | undecided → Release 6.7 |
---|---|
Summary: | Smart attributes support for WDC SAS products → [SAS/SCSI] Smart attributes support for WDC SAS products |
comment:7 by , 7 years ago
Summary: | [SAS/SCSI] Smart attributes support for WDC SAS products → [SAS/SCSI] Patch to support SMART attributes support for WDC SAS products |
---|
comment:8 by , 7 years ago
Some other suggestions:
- Please provide information if there is any vendor documentation about this log pages.
- I think if it is WDC specific only - this should be noted in the output. E.g. "WDC specific SMART attributes" or whatever. Same with a function names.
- To make automatic parser life easier - please use standard names for the standard attributes defined in the drivedb.h (e.g. attr. 9 or 12).
- In the drivedb entries please include model which was using for the test
- There is attribute logging code in the smartd. I think it would be great to add such attributes to it as well, however, it is not critical.
I think that patch providing useful functionality for the WDC drives owners, so if all issues are resolved it could be included in the 6.7.
Could you please provide more information about functionality added by the patch?