t/io_uring: properly detect numa nodes for passthrough mode
[fio.git] / t / io_uring.c
index 9d580b5af11b529af3233298547f8ed051ae88d7..3bce9e7e983a48ccaa35b088f39e2ade48d06290 100644 (file)
@@ -856,7 +856,10 @@ static int detect_node(struct submitter *s, const char *name)
        char str[128];
        int ret, fd, node;
 
-       sprintf(str, "/sys/block/%s/device/numa_node", base);
+       if (pt)
+               sprintf(str, "/sys/class/nvme-generic/%s/device/numa_node", base);
+       else
+               sprintf(str, "/sys/block/%s/device/numa_node", base);
        fd = open(str, O_RDONLY);
        if (fd < 0)
                return -1;