Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -7865,7 +7865,7 @@ static int copy_cmd(int argc, char **argv, struct command *acmd, struct plugin *
nats = argconfig_parse_comma_sep_array_u16(cfg.elbats, elbats,
ARRAY_SIZE(elbats));

nr = max(nb, max(ns, max(nrts, max(natms, nats))));
nr = max(nb, max(ns, max(nrts, max(natms, nats)))) - 1;
if (cfg.format == 2 || cfg.format == 3) {
if (nr != nids) {
nvme_show_error("formats 2 and 3 require source namespace ids for each source range");
Expand All @@ -7875,7 +7875,7 @@ static int copy_cmd(int argc, char **argv, struct command *acmd, struct plugin *
nvme_show_error("formats 0 and 1 do not support cross-namespace copy");
return -EINVAL;
}
if (!nr || nr > 256) {
if (nr > 255) {
nvme_show_error("invalid range");
return -EINVAL;
}
Expand Down
Loading