]> www.infradead.org Git - users/sagi/libnvme.git/commit
tree: Don't open nvme devices until it's absolutely required
authorMartin Belanger <martin.belanger@dell.com>
Mon, 3 Jul 2023 18:41:14 +0000 (14:41 -0400)
committerDaniel Wagner <wagi@monom.org>
Mon, 10 Jul 2023 07:46:32 +0000 (09:46 +0200)
commita5ce0579608dad9eeb59ad5815ee704e507fe9d6
tree8fcc54c6a430bd511b499857cb418cf0c7844cb1
parentc56910f807795528fff7ba6b81f8efcdb4babe98
tree: Don't open nvme devices until it's absolutely required

Don't open nvme devices while scanning the tree. Only open devices
when we actually need to write commands to them.

This patch also provides functions to close fds when a user no
longer needs them to be open.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
src/libnvme.map
src/nvme/private.h
src/nvme/tree.c
src/nvme/tree.h