diff options
author | Guixin Liu <kanie@linux.alibaba.com> | 2023-12-27 17:31:06 +0800 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-01-05 13:15:41 -0800 |
commit | bafd590910d00327decb3937e77f6f11c3e80e4b (patch) | |
tree | bfd836536611315ee1bc662340ef85c46639dd1a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | bd029a02ce46e77e4d553140b039f93cf78ee8c1 (diff) |
nvme: introduce nvme_disk_is_ns_head helper
We currently rely on gendisk's file operations (fops) to distinguish
between a namespace head (ns_head) and a regular namespace. To enhance
code readability, introduce a helper function.
Additionally, we must ensure that the device is not an ns_head before
calling nvme_get_ns_from_dev(). To enforce this, add a WARN_ON check
within the nvme_get_ns_from_dev().
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Liu Song <liusong@linux.alibaba.com>
[include fix: https://lore.kernel.org/oe-kbuild-all/202401031943.0N72Tkji-lkp@intel.com/]
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions