1
0
Fork 0

Merging upstream version 2.11.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:28:30 +01:00
parent 6f6d3e85f8
commit 0f2367f2fa
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
533 changed files with 9033 additions and 4835 deletions

View file

@ -113,6 +113,7 @@ _nvme () {
'ocp:OCP cloud SSD extensions'
'solidigm:Solidigm plug-in extensions'
'micron:Micron plug-in extensions'
'dapustor:DapuStor plug-in extensions'
'help:print brief descriptions of all nvme commands'
'json:dump output in json format'
)
@ -358,6 +359,33 @@ _nvme () {
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp set-error-injection options" _set_error_injection
;;
(hardware-component-log)
local _hardware_component_log
_hardware_component_log=(
/dev/nvme':supply a device to use (required)'
--comp-id=':component identifier'
-i':alias for --comp-id'
--list':list component descriptions'
-v':alias for --list'
--verbose':Increase the information detail in the output.'
-v':alias for --verbose'
--output-format=':Output format: normal|json|binary'
-o ':alias for --output-format'
--timeout=':value for timeout'
-t ':alias for --timeout'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp hardware-component-log options" _hardware_component_log
(set-telemetry-profile)
local _ocp_set_telemetry_profile_feature
_ocp_set_telemetry_profile_feature=(
/dev/nvme':supply a device to use (required)'
--telemetry-profile-select=':Telemetry Profile Select'
-t':alias for --telemetry-profile-select'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp set-telemetry-profile options" _ocp_set_telemetry_profile_feature
;;
(*)
_files
;;
@ -533,15 +561,56 @@ _nvme () {
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm vs-drive-info" _vs_drive_info
;;
(set-telemetry-profile)
local _ocp_set_telemetry_profile_feature
_ocp_set_telemetry_profile_feature=(
/dev/nvme':supply a device to use (required)'
--telemetry-profile-select=':Telemetry Profile Select'
-t':alias for --telemetry-profile-select'
(workload-tracker)
local _workload_tracker
_workload_tracker=(
--enable':Enable Workload Tracker'
-e':alias for --enable'
--disable':Disable Workload Tracker'
-d':alias for --disable'
--sample-time=':Sample time in seconds'
-s':alias for --sample-time'
--type=':Workload Tracker type'
-t':alias for --type'
--run-time=':Run time in seconds'
-r':alias for --run-time'
--flush-freq=':Flush frequency in seconds'
-f':alias for --flush-freq'
--wall-clock':Use wall clock time'
-w':alias for --wall-clock'
--trigger-field=':Trigger field'
-T':alias for --trigger-field'
--trigger-threshold=':Trigger threshold'
-V':alias for --trigger-threshold'
--trigger-on-delta':Trigger on delta'
-D':alias for --trigger-on-delta'
--trigger-on-latency':Trigger on latency'
-L':alias for --trigger-on-latency'
--verbose':Increase output verbosity'
-v':alias for --verbose'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp set-telemetry-profile options" _ocp_set_telemetry_profile_feature
_describe -t commands "nvme solidigm workload-tracker options" _workload_tracker
;;
(*)
_files
;;
esac
;;
(dapustor)
case ${words[2]} in
(smart-log-add)
local _smart_log_add
_smart_log_add=(
--namespace-id':(optional) desired namespace'
-n':alias for --namespace-id'
--output-format':Output format: normal|json|binary'
-o':alias for --output-format'
--raw-binary':dump log in binary format'
-b':alias of --raw-binary'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme dapustor smart-log-add options" _smart_log_add
;;
(*)
_files
@ -1176,6 +1245,10 @@ _nvme () {
-b':alias to --raw-binary'
--timeout=':value for timeout'
-t':alias of --timeout'
--human-readable':show feature in readable format'
-H':alias of --human-readable'
--changed':show feature changed'
-C':alias of --changed'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme get-feature options" _getf
@ -1452,10 +1525,12 @@ _nvme () {
-n':alias of --owpass'
--ause':Allow unrestricted sanitize exit'
-u':alias of --ause'
--sanact=':Sanitize action: 1 = Exit failure mode, 2 = Start block erase, 3 = Start overwrite, 4 = Start crypto erase'
--sanact=':Sanitize action: 1 = Exit failure mode, 2 = Start block erase, 3 = Start overwrite, 4 = Start crypto erase, 5 = Exit media verification'
-a':alias of --sanact'
--ovrpat=':Overwrite pattern'
-p':alias of --ovrpat'
--emvs=':Enter media verification state'
-e':alias of --emvs'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme sanitize options" _sanitize
@ -2562,6 +2637,7 @@ _nvme () {
tcg-configuration-log':tcg configuration log'
get-error-injection':get error injection'
set-error-injection':set error injection'
hardware-component-log':retrieve hardware component log'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp options" _ocp
@ -2583,6 +2659,7 @@ _nvme () {
log-page-directory':Retrieve log page directory'
temp-stats':Retrieve Temperature Statistics log'
vs-drive-info':Retrieve drive information'
workload-tracker':Enable/Disable and configure Workload Tracker'
cloud-SSDplugin-version':Prints plug-in OCP version'
version':Shows the program version'
help':Display this help'
@ -2618,6 +2695,16 @@ _nvme () {
_arguments '*:: :->subcmds'
_describe -t commands "nvme micron options" _micron
;;
(dapustor)
local _dapustor
_dapustor=(
smart-log-add':Retrieve DapuStor SMART Log'
version':Shows the program version'
help':Display this help'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme dapustor options" _dapustor
;;
(help)
local _h
_h=( id-ctrl id-ns list-ns id-iocs create-ns delete-ns attach-ns detach-ns
@ -2635,7 +2722,7 @@ _nvme () {
get-property write-zeroes write-uncor verify sanitize sanitize-log reset
subsystem-reset ns-rescan get-lba-status dsm discover connect-all connect
dim disconnect disconnect-all gen-hostnqn show-hostnqn tls-key dir-receive
dir-send virt-mgmt rpmb version ocp solidigm
dir-send virt-mgmt rpmb version ocp solidigm dapustor
)
_arguments '*:: :->subcmds'
_describe -t commands "help: infos on a specific nvme command, or provide no option to see a synopsis of all nvme commands" _h

View file

@ -205,7 +205,7 @@ nvme_list_opts () {
"get-feature")
opts+=" --namespace-id= -n --feature-id= -f --sel= -s \
--data-len= -l --cdw11= --c -uuid-index= -U --raw-binary -b \
--human-readable -H --timeout= -t"
--human-readable -H --timeout= -t --changed -C"
;;
"device-self-test")
opts+=" --namespace-id= -n --self-test-code= -s --timeout= -t"
@ -356,10 +356,11 @@ nvme_list_opts () {
;;
"sanitize")
opts+=" --no-dealloc -d --oipbp -i --owpass= -n \
--ause -u --sanact= -a --ovrpat= -p"
--ause -u --sanact= -a --ovrpat= -p --emvs= -e"
case $opt in
--sanact|-a)
vals+=" exit-failure start-block-erase start-overwrite start-crypto-erase"
vals+=" exit-failure start-block-erase start-overwrite \
start-crypto-erase exit-media-verification"
;;
esac
;;
@ -1181,6 +1182,13 @@ plugin_solidigm_opts () {
"temp-stats")
opts+=" --raw-binary -b"
;;
"workload-tracker")
opts+=" --enable -e --disable -d --sample-time= -s \
--type= -t --run-time= -r --flush-freq= -f \
--wall-clock -w --trigger-field= -T \
--trigger-threshold= -V --trigger-on-delta -D \
--trigger-on-latency -L --verbose -v"
;;
"version")
opts+=$NO_OPTS
;;
@ -1228,6 +1236,38 @@ plugin_transcend_opts () {
return 0
}
plugin_dapustor_opts () {
local opts=""
local compargs=""
local nonopt_args=0
for (( i=0; i < ${#words[@]}-1; i++ )); do
if [[ ${words[i]} != -* ]]; then
let nonopt_args+=1
fi
done
if [ $nonopt_args -eq 3 ]; then
opts="/dev/nvme* "
fi
opts+=" "
case "$1" in
"smart-log-add")
opts+=" --namespace-id= -n --raw-binary -b \
--json -j"
;;
"help")
opts+=$NO_OPTS
;;
esac
COMPREPLY+=( $( compgen $compargs -W "$opts" -- $cur ) )
return 0
}
plugin_zns_opts () {
local opts=""
local compargs=""
@ -1491,6 +1531,10 @@ plugin_ocp_opts () {
opts+=" --data= -d --number= -n --no-uuid -N --type= -t \
--nrtdp= -r --verbose -v --output-format -o --timeout="
;;
"hardware-component-log")
opts+=" --comp-id= -i --list -l --verbose -v \
--output-format -o --timeout= -t"
;;
"help")
opts+=$NO_OPTS
;;
@ -1552,8 +1596,9 @@ _nvme_subcmds () {
clear-pcie-correctable-errors parse-telemetry-log \
clear-fw-activate-history vs-fw-activate-history log-page-directory \
vs-drive-info cloud-SSDplugin-version market-log \
smart-log-add temp-stats version help"
smart-log-add temp-stats workload-tracker version help"
[transcend]="healthvalue badblock"
[dapustor]="smart-log-add"
[zns]="id-ctrl id-ns zone-mgmt-recv \
zone-mgmt-send report-zones close-zone \
finish-zone open-zone reset-zone offline-zone \
@ -1569,7 +1614,8 @@ _nvme_subcmds () {
set-dssd-power-state-feature get-dssd-power-state-feature \
telemetry-string-log set-telemetry-profile \
set-dssd-async-event-config get-dssd-async-event-config \
get-error-injection set-error-injection"
get-error-injection set-error-injection \
hardware-component-log"
)
# Associative array mapping plugins to corresponding option completions
@ -1588,6 +1634,7 @@ _nvme_subcmds () {
[sfx]="plugin_sfx_opts"
[solidigm]="plugin_solidigm_opts"
[transcend]="plugin_transcend_opts"
[dapustor]="plugin_dapustor_opts"
[zns]="plugin_zns_opts"
[nvidia]="plugin_nvidia_opts"
[ymtc]="plugin_ymtc_opts"