Skip to content

Commit c0eb6e1

Browse files
committed
lib: avoid kernel logging cmd does not match nsid
The ioctl probing needs to be a bit smarter to avoid kernel logging invalid commands. At least set the NSID correctly. Signed-off-by: Daniel Wagner <[email protected]>
1 parent c874903 commit c0eb6e1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libnvme/src/nvme/lib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ static int __nvme_transport_handle_open_direct(
167167
}
168168

169169
if (hdl->ctx->ioctl_probing) {
170+
/* avoid kernel logging 'cmd does not match nsid' */
171+
dummy.nsid = ns;
170172
ret = ioctl(hdl->fd, LIBNVME_IOCTL_ADMIN64_CMD, &dummy);
171173
if (ret > 0) {
172174
hdl->ioctl_admin64 = true;

0 commit comments

Comments
 (0)