Running fio on an NVMEoF device with multipath slaves fails with a "No
such file or directory" error when displaying disk stats. Correct this
by using a different path to the sysfs slave device.
[sitsofe: change new path to be a fallback when regular path fails]
Fixes: https://github.com/axboe/fio/issues/525
Closes: https://github.com/axboe/fio/pull/526
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
slavepath[linklen] = '\0';
sprintf(temppath, "%s/%s/dev", slavesdir, slavepath);
+ if (access(temppath, F_OK) != 0)
+ sprintf(temppath, "%s/%s/device/dev", slavesdir, slavepath);
if (read_block_dev_entry(temppath, &majdev, &mindev)) {
perror("Error getting slave device numbers.");
closedir(dirhandle);