* Fri Apr 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc8-1

- Upstream v1.0 Release Candidate 8
This commit is contained in:
Tomas Bzatek 2022-04-01 15:30:33 +02:00
parent 4a3e657cbc
commit f82fabb0a5
5 changed files with 6 additions and 60 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/libnvme-1.0-rc5.tar.gz
/libnvme-1.0-rc6.tar.gz
/libnvme-1.0-rc7.tar.gz
/libnvme-1.0-rc8.tar.gz

View File

@ -3,16 +3,12 @@
Name: libnvme
Summary: Linux-native nvme device management library
Version: 1.0~rc7
Version: 1.0~rc8
Release: 1%{?dist}
License: LGPLv2+
URL: https://github.com/linux-nvme/libnvme
Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
# backport from upstream
Patch1: nvme_scan_ctrl_1.patch
Patch2: nvme_scan_ctrl_2.patch
BuildRequires: gcc gcc-c++
BuildRequires: swig
BuildRequires: python3-devel
@ -92,6 +88,9 @@ rm -rf %{buildroot}%{_pkgdocdir}/nvme
%{python3_sitearch}/libnvme/*
%changelog
* Fri Apr 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc8-1
- Upstream v1.0 Release Candidate 8
* Wed Mar 23 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc7-1
- Upstream v1.0 Release Candidate 7
- Renamed python3-nvme subpackage to python3-libnvme

View File

@ -1,31 +0,0 @@
commit df80eb6a6357bbaa05dcad3503918745323ad8f1
Author: Tomas Bzatek <tbzatek@redhat.com>
Date: Tue Mar 22 16:22:30 2022 +0100
tree: Fix subsystem initialization in nvme_scan_ctrl()
The subsystem instance would normally get properly initialized
in later stages of topology scanning, unless there's a host
mismatch and the instance would stand alone.
diff --git a/src/nvme/tree.c b/src/nvme/tree.c
index 96106b0..0764690 100644
--- a/src/nvme/tree.c
+++ b/src/nvme/tree.c
@@ -1364,10 +1364,13 @@ nvme_ctrl_t nvme_scan_ctrl(nvme_root_t r, const char *name)
subsysname = nvme_ctrl_lookup_subsystem_name(r, name);
/* subsysname might be NULL here */
s = nvme_lookup_subsystem(h, subsysname, subsysnqn);
- if (subsysname)
- free(subsysname);
free(subsysnqn);
- if (!s) {
+
+ ret = 0;
+ if (s && !s->name)
+ ret = nvme_init_subsystem(s, subsysname);
+ free(subsysname);
+ if (!s || ret < 0) {
free(path);
errno = ENOMEM;
return NULL;

View File

@ -1,23 +0,0 @@
commit 01ffcb46259205fe4a9b49aecc8888253dfbf7a2
Author: Tomas Bzatek <tbzatek@redhat.com>
Date: Wed Mar 23 13:17:02 2022 +0100
tree: Handle NULL subsysname in nvme_scan_ctrl()
As noted couple of lines earlier, the subsysname string might
be NULL. In that case, defer initialization of nvme_subsystem_t
in hope that it would get initialized while scanning subsystems.
diff --git a/src/nvme/tree.c b/src/nvme/tree.c
index 0764690..5042a8e 100644
--- a/src/nvme/tree.c
+++ b/src/nvme/tree.c
@@ -1367,7 +1367,7 @@ nvme_ctrl_t nvme_scan_ctrl(nvme_root_t r, const char *name)
free(subsysnqn);
ret = 0;
- if (s && !s->name)
+ if (s && !s->name && subsysname)
ret = nvme_init_subsystem(s, subsysname);
free(subsysname);
if (!s || ret < 0) {

View File

@ -1 +1 @@
SHA512 (libnvme-1.0-rc7.tar.gz) = c6185a909fbe9380f207d47c0dd2198c062b8dab1ef75da77db300ba61e6f262f0658518ee89ee710aae9bf342e7d0147ffe8f282f3f352ae386350ccf06a817
SHA512 (libnvme-1.0-rc8.tar.gz) = 96a739a1f3e01d6c8d622d4c7e3aa6336ad303df13cf3aa394b1843d5913a25bff226cf087eecbfb2c8c7f3b6a7215ca6bb084babffae8dc349ddeabbee16595