-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nvme: do not scan topology when mmaping registers
For accessing the registers we don't need to scan the topology. With the device name we already know where to lookup the resource0 file in sysfs. We also don't need to do the fallback lookup via the namespaces because Linux kernel v4.0 has introduced the link in /sys/class/nvme/nvme%d. And nvme-cli 2.x depends on Linux kernel >= 4.15, so it's safe to drop the fallback. This avoids all the topology scanning which is excessive and also might issue an 'id command' via the nuse sysfs entry. So let's not do it. Signed-off-by: Daniel Wagner <[email protected]>
- Loading branch information
Showing
1 changed file
with
9 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters