diff options
author | Logan Gunthorpe <[email protected]> | 2020-07-24 11:25:15 -0600 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2020-07-29 07:45:21 +0200 |
commit | f783f444ceaa7eab043a7a5ae0e34c68743c0358 (patch) | |
tree | 1ea6552838f621e0704f72e6e5be5600ff6796c2 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
parent | 17365ae6975c7f7494a2d1cd0bf18b5ed238e072 (diff) |
nvme: introduce nvme_ctrl_get_by_path()
nvme_ctrl_get_by_path() is analogous to blkdev_get_by_path() except it
gets a struct nvme_ctrl from the path to its char dev (/dev/nvme0).
It makes use of filp_open() to open the file and uses the private
data to obtain a pointer to the struct nvme_ctrl. If the fops of the
file do not match, -EINVAL is returned.
The purpose of this function is to support NVMe-OF target passthru
and is exported under the NVME_TARGET_PASSTHRU namespace.
Signed-off-by: Logan Gunthorpe <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Max Gurtovoy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions