#1694 closed defect (fixed)
SATA fix for 3snic raid controller
Reported by: | steven.song | Owned by: | Christian Franke |
---|---|---|---|
Priority: | minor | Milestone: | Release 7.4 |
Component: | all | Version: | |
Keywords: | 3snic linux | Cc: |
Description
I fixed some issues when using SATA disks.
Please see attached log files.
Attachments (4)
Change History (8)
by , 22 months ago
Attachment: | os_linux.cpp.diff added |
---|
by , 22 months ago
Attachment: | smartctl-x.log added |
---|
comment:1 by , 22 months ago
Keywords: | 3snic linux added |
---|---|
Milestone: | → undecided |
Summary: | Enhancement for 3snic raid controller → SATA fix for 3snic raid controller |
Type: | patch → defect |
Thanks for the patch. Looks like the CK_COND
issue is fixed now.
Remaining issues, some found by cppcheck (https://cppcheck.sourceforge.io/):
- Line 1511: Non-boolean value returned from function returning bool:
return (r)
always returns nonzero, which is interpreted astrue
. IMPORTANT: Before submitting future patches, make sure to check also for sane behavior ifioctl()
fails. - Line 1520: The cast of the first parameter is useless because it is already a pointer.
- Line 1520: Always use C++-style casts instead of C-style casts for T=>pointer conversions, for example:
memcpy(iop->sensep, reinterpret_cast<void *>(io_hdr_v4.response), len);
- Hint: Never use legacy
NULL
(which is the same as0
in C++) in new C++ code, use C++11nullptr
instead. Using the pointer as a boolean in conditions is allowed, for exampleif (iop->sensep && len > 0) ...
. - Hint: Lines 1449-1455: All three initial
memset(...)
are not needed, C++11 zero initialization is more safe. Simply append{}
, for example:struct sg_io_v4 io_hdr_v4{};
- Line 1515: Remove trailing whitespaces.
- As usual provide a
ChangeLog
entry - in same diff/patch file please.
by , 21 months ago
comment:2 by , 21 months ago
Milestone: | undecided → Release 7.4 |
---|---|
Owner: | set to |
Status: | new → accepted |
comment:4 by , 21 months ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Applied in r5457, thanks!
Note:
See TracTickets
for help on using tickets.
smartctl -x