1
0
Fork 0

Adding upstream version 2.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:15:30 +01:00
parent 50aec1e4c5
commit 1b3a431c1d
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
521 changed files with 21541 additions and 21644 deletions

View file

@ -13,8 +13,6 @@ readonly _plugin_subcmds=(
set-bucket-thresholds lat-stats-tracking \
market-name smart-log-add temp-stats"
[amzn]="id-ctrl"
[lnvm]="list info id-ns chunk-log init create \
remove factory diag-bbtbl diag-set-bbtbl"
[memblaze]="smart-log-add get-pm-status set-pm-status \
select-download lat-stats lat-stats-print lat-log \
lat-log-print clear-error-log"
@ -61,7 +59,6 @@ typeset -A _plugin_funcs
readonly _plugin_funcs=(
[intel]="plugin_intel_opts"
[amzn]="plugin_amzn_opts"
[lnvm]="plugin_lnvm_opts"
[memblaze]="plugin_memblaze_opts"
[wdc]="plugin_wdc_opts"
[huawei]="plugin_huawei_opts"
@ -81,6 +78,7 @@ readonly _plugin_funcs=(
# Top level commands
_cmds="list list-subsys id-ctrl id-ns \
id-ns-granularity list-ns list-ctrl \
id-ns-lba-format nvm-id-ns nvm-id-ns-lba-format \
nvm-id-ctrl primary-ctrl-caps list-secondary \
ns-descs id-nvmset id-uuid id-iocs create-ns \
delete-ns get-ns-id get-log telemetry-log \
@ -101,8 +99,8 @@ _cmds="list list-subsys id-ctrl id-ns \
connect disconnect disconnect-all gen-hostnqn \
show-hostnqn dir-receive dir-send virt-mgmt \
rpmb boot-part-log fid-support-effects-log \
supported-log-pages lockdown"
supported-log-pages list-endgrp"
supported-log-pages lockdown media-unit-stat-log \
supported-cap-config-log dim"
# Add plugins:
for plugin in "${!_plugin_subcmds[@]}"; do
@ -148,6 +146,10 @@ nvme_list_opts () {
"id-ns-granularity")
opts+=" --output-format= -o"
;;
"id-ns-lba-format")
opts+=" --lba-format-index= -i --uuid-index= -U \
--verbose -v --output-format= -o"
;;
"list-ns")
opts+=" --namespace-id= -n --al -a --csi= -y \
--outputformat= -o"
@ -160,12 +162,17 @@ nvme_list_opts () {
opts+=" --namespace-id= -n --raw-binary -b \
--human-readable -H --output-format= -o"
;;
"id-domain")
opts+=" --dom-id= -d --output-format= -o"
;;
"nvm-id-ctrl")
opts+=" --output-format= -o"
;;
"nvm-id-ns")
opts+=" --namespace-id= -n --uuid-index= -U\
--verbose -v --output-format= -o"
;;
"nvm-id-ns-lba-format")
opts+=" --lba-format-index= -i --uuid-index= -U \
--verbose -v --output-format= -o"
;;
"primary-ctrl-caps")
opts+=" --output-format= -o --human-readable -H"
;;
@ -271,6 +278,14 @@ nvme_list_opts () {
opts+=" --lsp -s --output-file= -f \
--output-format= -o"
;;
"media-unit-stat-log")
opts+=" --dom-id= -d --output-format= -o \
--raw-binary -b"
;;
"supported-cap-config-log")
opts+=" --dom-id= -d --output-format= -o \
--raw-binary -b"
;;
"get-feature")
opts+=" --namespace-id= -n --feature-id= -f --sel= -s \
--data-len= -l --cdw11= --c -uuid-index= -U --raw-binary -b \
@ -356,11 +371,11 @@ nvme_list_opts () {
--rrela= -a --iekey -i"
;;
"resv-report")
opts+=" --namespace-id= -n --numd= -d --cdw11 -c \
--output-format= -o --raw-binary -b"
opts+=" --namespace-id= -n --numd= -d --eds -e \
--raw-binary= -b --output-format= -o"
;;
"dsm")
opts+=" --namespace-id= -n --ctx-attrs= -a --blocks= -b \
opts+=" --namespace-id= -n --ctx-attrs= -a --blocks= -b\
--slbs= -s --ad -d --idw -w --idr -r --cdw11= -c"
;;
"copy")
@ -442,26 +457,26 @@ nvme_list_opts () {
;;
"discover")
opts+=" --transport= -t -traddr= -a -trsvcid= -s \
--host-traddr= -w --hsot-iface= -f \
--host-traddr= -w --host-iface= -f \
--hostnqn= -q --hostid -I --raw= -r \
--raw= -r --device= -d --keep-alive-tmo= -k \
--ctrl-loss-tmo= -l --fast-io-fail-tmo= -f \
--tos= -T --hdr-digest= -g --data-digest -G \
--nr-io-queues= -i --nr-write-queues= -W \
--nr-poll-queues= -P --queue-size= -Q \
--persistent -p --quiet -S --matching -m \
--persistent -p --quiet -S \
--output-format= -o"
;;
"connect-all")
opts+=" --transport= -t -traddr= -a -trsvcid= -s \
--host-traddr= -w --hsot-iface= -f \
--host-traddr= -w --host-iface= -f \
--hostnqn= -q --hostid -I --raw= -r \
--raw= -r --device= -d --keep-alive-tmo= -k \
--ctrl-loss-tmo= -l --fast-io-fail-tmo= -f \
--tos= -T --hdr-digest= -g --data-digest -G \
--nr-io-queues= -i --nr-write-queues= -W \
--nr-poll-queues= -P --queue-size= -Q \
--persistent -p --quiet -S --matching -m \
--persistent -p --quiet -S \
--output-format= -o"
;;
"connect")
@ -473,6 +488,9 @@ nvme_list_opts () {
--tos= -T --duplicate-connect -D --disable-sqflow -d\
--hdr-digest -g --data-digest -G --output-format= -o"
;;
"dim")
opts+=" --task -t --nqn -n --device -d"
;;
"disconnect")
opts+=" --nqn -n --device -d"
;;
@ -606,68 +624,6 @@ plugin_amzn_opts () {
return 0
}
plugin_lnvm_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
"list")
opts+=$NO_OPTS
;;
"info")
opts+=$NO_OPTS
;;
"id-ns")
opts+=" --namespace-id= -n --raw-binary -b --human-readable -H"
;;
"chunk-log")
opts+=" --output-format= -o --human-readable -H"
;;
"init")
opts+=" --device-name= -d --mediamgr-name -m"
;;
"create")
opts+=" --device-name= -d --target-name= -n --target-type= -t \
--lun-begin= -b --lun-end= -e --over-prov= -o --factory -f"
;;
"remove")
opts+=" --target-name= -n"
;;
"factory")
opts+=" --device-name= -d --erase-only-marked -e
--clear-host-side-blks -s --clear-bb-blks -b"
;;
"diag-bbtbl")
opts+=" --namespace-id= -n --channel-id= -c --lun-id= -l \
--raw-binary -b"
;;
"diag-set-bbtbl")
opts+=" --namespace-id= -n --channel-id= -c --lun-id= -l \
--plane-id= -p --block-id= -b --value= -v"
;;
"help")
opts+=$NO_OPTS
;;
esac
COMPREPLY+=( $( compgen $compargs -W "$opts" -- $cur ) )
return 0
}
plugin_memblaze_opts () {
local opts=""
local compargs=""
@ -1261,7 +1217,7 @@ plugin_zns_opts () {
--data-len= -l"
;;
"zone-mgmt-send")
opts+=" --namespace-id= -n --start-lba= -s \
opts+=" --namespace-id= -n --start-lba= -s --zsaso -o \
--select-all -a --zsa= -z --data-len= -l \
--data= -d --timeout= -t"
;;
@ -1280,7 +1236,7 @@ plugin_zns_opts () {
;;
"open-zone")
opts+=" --namespace-id= -n --start-lba= -s \
--select-all -a --timeout= -t"
--select-all -a --timeout= -t --zrwa -r"
;;
"reset-zone")
opts+=" --namespace-id= -n --start-lba= -s \
@ -1292,7 +1248,10 @@ plugin_zns_opts () {
;;
"set-zone-desc")
opts+=" --namespace-id= -n --start-lba= -s \
--data= -d --timeout= -t"
--data= -d --timeout= -t --zrwa -r"
;;
"flush-zone")
opts+=" --namespace-id= -n --last-lba= -l --timeout= -t"
;;
"zone-append")
opts+=" --namespace-id= -n --zslba= -s --data-size= -z \