plugin/ocp: Added OCP 2.7 smart extended log changes#2966
Merged
igaw merged 1 commit intolinux-nvme:masterfrom Jan 20, 2026
Merged
plugin/ocp: Added OCP 2.7 smart extended log changes#2966igaw merged 1 commit intolinux-nvme:masterfrom
igaw merged 1 commit intolinux-nvme:masterfrom
Conversation
ikegami-t
reviewed
Nov 29, 2025
plugins/ocp/ocp-print-json.c
Outdated
| ascii += sprintf(ascii, "%c", log->dssd_firmware_build_label[i]); | ||
| json_object_add_value_string(root, "Dssd firmware build label", ascii_arr); | ||
| json_object_add_value_uint(root, "Die in use bad nand block", | ||
| le64_to_cpu(log->die_in_use_bad_nand_block)); |
Contributor
There was a problem hiding this comment.
FYI: The checkpatch line length changed to 80 from 100 by the commit: 2598ec2.
Collaborator
|
Oops, I think this fell through the cracks. Anyway, the build fails, could you please addresse the issues? Thanks! |
9f79268 to
396fc4b
Compare
Collaborator
|
the build fails: FAILED: nvme.p/plugins_ocp_ocp-smart-extended-log.c.o
gcc -Invme.p -I. -I.. -Iccan -I../ccan -Ilibnvme -I../libnvme -Ilibnvme/src -I../libnvme/src -I/usr/include/json-c -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=gnu99 -O3 -fomit-frame-pointer -D_GNU_SOURCE -include /__w/nvme-cli/nvme-cli/.build-ci/nvme-config.h -MD -MQ nvme.p/plugins_ocp_ocp-smart-extended-log.c.o -MF nvme.p/plugins_ocp_ocp-smart-extended-log.c.o.d -o nvme.p/plugins_ocp_ocp-smart-extended-log.c.o -c ../plugins/ocp/ocp-smart-extended-log.c
In function ‘get_c0_log_page’,
inlined from ‘ocp_smart_add_log’ at ../plugins/ocp/ocp-smart-extended-log.c:126:8:
../plugins/ocp/ocp-smart-extended-log.c:69:64: error: array subscript ‘struct ocp_smart_extended_log[0]’ is partly outside array bounds of ‘unsigned char[512]’ [-Werror=array-bounds=]
69 | if (scao_guid[i] != data->log_page_guid[i]) {
| ~~~~~~~~~~~~~~~~~~~^~~
../plugins/ocp/ocp-smart-extended-log.c:45:50: note: object of size 512 allocated by ‘malloc’
45 | data = (struct ocp_smart_extended_log *) malloc(sizeof(__u8) * C0_SMART_CLOUD_ATTR_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../plugins/ocp/ocp-smart-extended-log.c:79:82: error: array subscript ‘struct ocp_smart_extended_log[0]’ is partly outside array bounds of ‘unsigned char[512]’ [-Werror=array-bounds=]
79 | fprintf(stderr, "%x", data->log_page_guid[j]);
| ~~~~~~~~~~~~~~~~~~~^~~
../plugins/ocp/ocp-smart-extended-log.c:45:50: note: object of size 512 allocated by ‘malloc’
45 | data = (struct ocp_smart_extended_log *) malloc(sizeof(__u8) * C0_SMART_CLOUD_ATTR_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
396fc4b to
bb2f85f
Compare
Updated the smart extended log page structure, json and stdout print ocp2.7 enhancement. Reviewed-by: Karthik Balan <karthik.b82@samsung.com> Reviewed-by: Arunpandian J <arun.j@samsung.com> Signed-off-by: Gopinath P/Gopinath P <p.gopinath@samsungds.net>
bb2f85f to
65ce4d9
Compare
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ocp_smart_extended_log strcuture enhancement and print statement modification in stdout_smart_extended_log and json_smart_extended_log_v1
Reviewed-by: Karthik Balan karthik.b82@samsung.com
Reviewed-by: Arunpandian J arun.j@samsung.com