Skip to content

Commit c88f924

Browse files
committed
nvme: add --block-size option to io commands to bypass identify commands.
When specified, the --block-size is used as the logical block size in bytes, and the --metadata-size is used as the metadata size in bytes. Signed-off-by: Nate Thornton <[email protected]>
1 parent 7209089 commit c88f924

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

completions/_nvme

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,6 +2039,8 @@ _nvme () {
20392039
-s':alias of --start-block'
20402040
--block-count=':number of logical blocks on device to compare to local data'
20412041
-c':alias of --block-count'
2042+
--block-size=':if specified, logical block size in bytes (if not included, the logical block size is found through identify namespace)'
2043+
-b':alias of --block-size'
20422044
--metadata-size=':number of bytes of metadata to compare'
20432045
-y':alias of --metadata-size'
20442046
--data-size=':size of local data buffer in bytes'
@@ -2074,6 +2076,8 @@ _nvme () {
20742076
-s':alias of --start-block'
20752077
--block-count=':number of logical blocks on device to read'
20762078
-c':alias of --block-count'
2079+
--block-size=':if specified, logical block size in bytes (if not included, the logical block size is found through identify namespace)'
2080+
-b':alias of --block-size'
20772081
--data-size=':size of data to be read'
20782082
-z':alias of --data-size'
20792083
--metadata-size=':size of metadata to be read'
@@ -2111,6 +2115,8 @@ _nvme () {
21112115
-s':alias of --start-block'
21122116
--block-count=':number of logical blocks on device to write'
21132117
-c':alias of --block-count'
2118+
--block-size=':if specified, logical block size in bytes (if not included, the logical block size is found through identify namespace)'
2119+
-b':alias of --block-size'
21142120
--data-size=':size of data to be written'
21152121
-z':alias of --data-size'
21162122
--metadata-size=':size of metadata to be written'

completions/bash-nvme-completion.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ nvme_list_opts () {
308308
opts+=" --namespace-id= -n"
309309
;;
310310
"compare")
311-
opts+=" --start-block= -s --block-count= -c --data-size= -z \
311+
opts+=" --start-block= -s --block-count= -c --block-size= -b --data-size= -z \
312312
--metadata-size= -y --ref-tag= -r --data= -d \
313313
--metadata= -M --prinfo= -p --app-tag-mask= -m \
314314
--app-tag= -a --limited-retry -l \
@@ -317,7 +317,7 @@ nvme_list_opts () {
317317
--dry-run -w --latency -t --timeout="
318318
;;
319319
"read")
320-
opts+=" --start-block= -s --block-count= -c --data-size= -z \
320+
opts+=" --start-block= -s --block-count= -c --block-size= -b --data-size= -z \
321321
--metadata-size= -y --ref-tag= -r --data= -d \
322322
--metadata= -M --prinfo= -p --app-tag-mask= -m \
323323
--app-tag= -a --limited-retry -l \
@@ -326,7 +326,7 @@ nvme_list_opts () {
326326
--dry-run -w --latency -t --timeout="
327327
;;
328328
"write")
329-
opts+=" --start-block= -s --block-count= -c --data-size= -z \
329+
opts+=" --start-block= -s --block-count= -c --block-size= -b --data-size= -z \
330330
--metadata-size= -y --ref-tag= -r --data= -d \
331331
--metadata= -M --prinfo= -p --app-tag-mask= -m \
332332
--app-tag= -a --limited-retry -l \

0 commit comments

Comments
 (0)