Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157293926
D48654.id149879.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48654.id149879.diff
View Options
diff --git a/sbin/nvmecontrol/fabrics.c b/sbin/nvmecontrol/fabrics.c
--- a/sbin/nvmecontrol/fabrics.c
+++ b/sbin/nvmecontrol/fabrics.c
@@ -458,44 +458,40 @@
}
/* Validate I/O queue size. */
+ memset(io, 0, sizeof(*io) * num_io_queues);
if (queue_size == 0)
queue_size = (u_int)mqes + 1;
else if (queue_size > (u_int)mqes + 1) {
- shutdown_controller(*admin);
- nvmf_free_association(na);
warnx("I/O queue size exceeds controller maximum (%u)",
mqes + 1);
- return (EX_USAGE);
+ error = EX_USAGE;
+ goto out;
}
/* Fetch controller data. */
error = nvmf_host_identify_controller(*admin, cdata);
if (error != 0) {
- shutdown_controller(*admin);
- nvmf_free_association(na);
warnc(error, "Failed to fetch controller data for %s", subnqn);
- return (EX_IOERR);
+ error = EX_IOERR;
+ goto out;
}
nvmf_update_assocation(na, cdata);
error = nvmf_host_request_queues(*admin, num_io_queues, &queues);
if (error != 0) {
- shutdown_controller(*admin);
- nvmf_free_association(na);
warnc(error, "Failed to request I/O queues");
- return (EX_IOERR);
+ error = EX_IOERR;
+ goto out;
}
if (queues < num_io_queues) {
- shutdown_controller(*admin);
- nvmf_free_association(na);
warnx("Controller enabled fewer I/O queues (%u) than requested (%u)",
queues, num_io_queues);
- return (EX_PROTOCOL);
+ error = EX_PROTOCOL;
+ goto out;
}
/* I/O queues. */
- memset(io, 0, sizeof(*io) * num_io_queues);
for (u_int i = 0; i < num_io_queues; i++) {
memset(&qparams, 0, sizeof(qparams));
qparams.admin = false;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 21, 2:29 AM (13 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33369519
Default Alt Text
D48654.id149879.diff (1 KB)
Attached To
Mode
D48654: nvmecontrol: Consolidate error paths in connect_nvm_queues()
Attached
Detach File
Event Timeline
Log In to Comment