Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
8f9ab756e2
commit
70a0abe13f
874 changed files with 9553 additions and 1347 deletions
|
@ -3883,7 +3883,7 @@ The nvme command status if a response was received (see
|
|||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
|
||||
|
||||
|
||||
.. c:function:: int nvme_ns_mgmt_create (int fd, struct nvme_id_ns *ns, __u32 *nsid, __u32 timeout, __u8 csi)
|
||||
.. c:function:: int nvme_ns_mgmt_create (int fd, struct nvme_id_ns *ns, __u32 *nsid, __u32 timeout, __u8 csi, struct nvme_ns_mgmt_host_sw_specified *data)
|
||||
|
||||
Create a non attached namespace
|
||||
|
||||
|
@ -3905,6 +3905,9 @@ The nvme command status if a response was received (see
|
|||
``__u8 csi``
|
||||
Command Set Identifier
|
||||
|
||||
``struct nvme_ns_mgmt_host_sw_specified *data``
|
||||
Host Software Specified Fields that defines ns creation parameters
|
||||
|
||||
**Description**
|
||||
|
||||
On successful creation, the namespace exists in the subsystem, but is not
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
top_source_dir = meson.current_source_dir() + '/../../'
|
||||
|
||||
want_docs = get_option('docs')
|
||||
|
||||
if want_docs != 'false'
|
||||
want_docs_build = get_option('docs-build')
|
||||
rstdir = get_option('rstdir')
|
||||
if want_docs_build
|
||||
kernel_doc = find_program('../kernel-doc')
|
||||
kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set('SYSCONFDIR', sysconfdir)
|
||||
|
||||
if want_docs == 'all' or want_docs == 'rst' or want_docs == 'html'
|
||||
foreach apif : api_files
|
||||
afile = files('../../src/nvme/' + apif)
|
||||
afile = files(top_source_dir + 'src/nvme/' + apif)
|
||||
subst = configure_file(
|
||||
input: afile,
|
||||
output: '@BASENAME@.subst',
|
||||
|
|
|
@ -1029,6 +1029,27 @@ New controller object, or NULL on failure.
|
|||
controller to free
|
||||
|
||||
|
||||
.. c:function:: __u16 nvme_mi_ctrl_id (nvme_mi_ctrl_t ctrl)
|
||||
|
||||
get the ID of a controller
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ctrl_t ctrl``
|
||||
controller to query
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve the ID of the controller, as defined by hardware, and available
|
||||
in the Identify (Controller List) data. This is the value passed to
|
||||
**nvme_mi_init_ctrl**, but may have been created internally via
|
||||
**nvme_mi_scan_ep**.
|
||||
|
||||
**Return**
|
||||
|
||||
the (locally-stored) ID of this controller.
|
||||
|
||||
|
||||
.. c:function:: char * nvme_mi_endpoint_desc (nvme_mi_ep_t ep)
|
||||
|
||||
Get a string describing a MI endpoint.
|
||||
|
@ -2969,7 +2990,7 @@ The nvme command status if a response was received (see
|
|||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_admin_ns_mgmt_create (nvme_mi_ctrl_t ctrl, struct nvme_id_ns *ns, __u8 csi, __u32 *nsid)
|
||||
.. c:function:: int nvme_mi_admin_ns_mgmt_create (nvme_mi_ctrl_t ctrl, struct nvme_id_ns *ns, __u8 csi, __u32 *nsid, struct nvme_ns_mgmt_host_sw_specified *data)
|
||||
|
||||
Helper for Namespace Management Create command
|
||||
|
||||
|
@ -2987,6 +3008,9 @@ The nvme command status if a response was received (see
|
|||
``__u32 *nsid``
|
||||
Set to new namespace ID on create
|
||||
|
||||
``struct nvme_ns_mgmt_host_sw_specified *data``
|
||||
Host Software Specified Fields that defines ns creation parameters
|
||||
|
||||
**Description**
|
||||
|
||||
Issues a Namespace Management (Create) command to **ctrl**, to create a
|
||||
|
|
1870
doc/rst/nbft.rst
Normal file
1870
doc/rst/nbft.rst
Normal file
File diff suppressed because it is too large
Load diff
|
@ -22,6 +22,37 @@ libnvme tree object interface
|
|||
Initialized :c:type:`nvme_root_t` object
|
||||
|
||||
|
||||
.. c:function:: void nvme_root_set_application (nvme_root_t r, const char *a)
|
||||
|
||||
Specify managing application
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_root_t r``
|
||||
:c:type:`nvme_root_t` object
|
||||
|
||||
``const char *a``
|
||||
Application string
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the managing application string for **r**.
|
||||
|
||||
|
||||
.. c:function:: const char * nvme_root_get_application (nvme_root_t r)
|
||||
|
||||
Get managing application
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_root_t r``
|
||||
:c:type:`nvme_root_t` object
|
||||
|
||||
**Description**
|
||||
|
||||
Returns the managing application string for **r** or NULL if not set.
|
||||
|
||||
|
||||
.. c:function:: void nvme_free_tree (nvme_root_t r)
|
||||
|
||||
Free root object
|
||||
|
@ -1319,6 +1350,21 @@ NVMe-over-Fabrics address string of **c** or empty string
|
|||
of no address is present.
|
||||
|
||||
|
||||
.. c:function:: const char * nvme_ctrl_get_phy_slot (nvme_ctrl_t c)
|
||||
|
||||
PCI physical slot number of a controller
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_ctrl_t c``
|
||||
Controller instance
|
||||
|
||||
**Return**
|
||||
|
||||
PCI physical slot number of **c** or empty string if slot
|
||||
number is not present.
|
||||
|
||||
|
||||
.. c:function:: const char * nvme_ctrl_get_firmware (nvme_ctrl_t c)
|
||||
|
||||
Firmware string of a controller
|
||||
|
@ -1885,6 +1931,37 @@ Returns the subsystem type of **s**.
|
|||
'nvm' or 'discovery'
|
||||
|
||||
|
||||
.. c:function:: const char * nvme_subsystem_get_application (nvme_subsystem_t s)
|
||||
|
||||
Return the application string
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_subsystem_t s``
|
||||
nvme_subsystem_t object
|
||||
|
||||
**Return**
|
||||
|
||||
Managing application string or NULL if not set.
|
||||
|
||||
|
||||
.. c:function:: void nvme_subsystem_set_application (nvme_subsystem_t s, const char *a)
|
||||
|
||||
Set the application string
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_subsystem_t s``
|
||||
nvme_subsystem_t object
|
||||
|
||||
``const char *a``
|
||||
application string
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the managing application string for **s**.
|
||||
|
||||
|
||||
.. c:function:: int nvme_scan_topology (nvme_root_t r, nvme_scan_filter_t f, void *f_args)
|
||||
|
||||
Scan NVMe topology and apply filter
|
||||
|
|
|
@ -9625,6 +9625,17 @@ entries are of a variable lengths (TEL), TEL is always a multiple of
|
|||
command requires access to media and
|
||||
the media is not ready.
|
||||
|
||||
``NVME_SC_FDP_DISABLED``
|
||||
Command is not allowed when
|
||||
Flexible Data Placement is disabled.
|
||||
|
||||
``NVME_SC_INVALID_PLACEMENT_HANDLE_LIST``
|
||||
The Placement Handle List is invalid
|
||||
due to invalid Reclaim Unit Handle Identifier or
|
||||
valid Reclaim Unit Handle Identifier but restricted or
|
||||
the Placement Handle List number of entries exceeded the
|
||||
maximum number allowed.
|
||||
|
||||
``NVME_SC_LBA_RANGE``
|
||||
LBA Out of Range: The command references
|
||||
an LBA that exceeds the size of the namespace.
|
||||
|
@ -11752,3 +11763,125 @@ true if **status** is of the specified type and value
|
|||
Reclaim Unit Handle Update
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_ns_mgmt_host_sw_specified
|
||||
|
||||
Namespace management Host Software Specified Fields.
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_ns_mgmt_host_sw_specified {
|
||||
__le64 nsze;
|
||||
__le64 ncap;
|
||||
__u8 rsvd16[10];
|
||||
__u8 flbas;
|
||||
__u8 rsvd27[2];
|
||||
__u8 dps;
|
||||
__u8 nmic;
|
||||
__u8 rsvd31[61];
|
||||
__le32 anagrpid;
|
||||
__u8 rsvd96[4];
|
||||
__le16 nvmsetid;
|
||||
__le16 endgid;
|
||||
__u8 rsvd104[280];
|
||||
__le64 lbstm;
|
||||
__le16 nphndls;
|
||||
__u8 rsvd394[105];
|
||||
union {
|
||||
__u8 rsvd499[13];
|
||||
struct {
|
||||
__u8 znsco;
|
||||
__le32 rar;
|
||||
__le32 ror;
|
||||
__le32 rnumzrwa;
|
||||
} zns;
|
||||
};
|
||||
__le16 phndl[128];
|
||||
__u8 rsvd768[3328];
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``nsze``
|
||||
Namespace Size indicates the total size of the namespace in
|
||||
logical blocks. The number of logical blocks is based on the
|
||||
formatted LBA size.
|
||||
|
||||
``ncap``
|
||||
Namespace Capacity indicates the maximum number of logical blocks
|
||||
that may be allocated in the namespace at any point in time. The
|
||||
number of logical blocks is based on the formatted LBA size.
|
||||
|
||||
``rsvd16``
|
||||
Reserved
|
||||
|
||||
``flbas``
|
||||
Formatted LBA Size, see :c:type:`enum nvme_id_ns_flbas <nvme_id_ns_flbas>`.
|
||||
|
||||
``rsvd27``
|
||||
Reserved
|
||||
|
||||
``dps``
|
||||
End-to-end Data Protection Type Settings, see
|
||||
:c:type:`enum nvme_id_ns_dps <nvme_id_ns_dps>`.
|
||||
|
||||
``nmic``
|
||||
Namespace Multi-path I/O and Namespace Sharing Capabilities, see
|
||||
:c:type:`enum nvme_id_ns_nmic <nvme_id_ns_nmic>`.
|
||||
|
||||
``rsvd31``
|
||||
Reserved
|
||||
|
||||
``anagrpid``
|
||||
ANA Group Identifier indicates the ANA Group Identifier of the
|
||||
ANA group of which the namespace is a member.
|
||||
|
||||
``rsvd96``
|
||||
Reserved
|
||||
|
||||
``nvmsetid``
|
||||
NVM Set Identifier indicates the NVM Set with which this
|
||||
namespace is associated.
|
||||
|
||||
``endgid``
|
||||
Endurance Group Identifier indicates the Endurance Group with
|
||||
which this namespace is associated.
|
||||
|
||||
``rsvd104``
|
||||
Reserved
|
||||
|
||||
``lbstm``
|
||||
Logical Block Storage Tag Mask Identifies the mask for the
|
||||
Storage Tag field for the protection information
|
||||
|
||||
``nphndls``
|
||||
Number of Placement Handles specifies the number of Placement
|
||||
Handles included in the Placement Handle List
|
||||
|
||||
``rsvd394``
|
||||
Reserved
|
||||
|
||||
``{unnamed_union}``
|
||||
anonymous
|
||||
|
||||
``rsvd499``
|
||||
Reserved for I/O Command Sets that extend this specification.
|
||||
|
||||
``zns``
|
||||
rsvd499( Zoned Namespace Command Set specific field )
|
||||
|
||||
``phndl``
|
||||
Placement Handle Associated RUH : This field specifies the Reclaim
|
||||
Unit Handle Identifier to be associated with the Placement Handle
|
||||
value. If the Flexible Data Placement capability is not supported or
|
||||
not enabled in specified Endurance Group, then the controller shall
|
||||
ignore this field.
|
||||
|
||||
``rsvd768``
|
||||
Reserved
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -67,6 +67,12 @@ libnvme utility functions
|
|||
``ENVME_CONNECT_CONNREFUSED``
|
||||
connection refused
|
||||
|
||||
``ENVME_CONNECT_ADDRNOTAVAIL``
|
||||
cannot assign requested address
|
||||
|
||||
``ENVME_CONNECT_IGNORED``
|
||||
connect attempt is ignored due to configuration
|
||||
|
||||
|
||||
.. c:function:: __u8 nvme_status_to_errno (int status, bool fabrics)
|
||||
|
||||
|
@ -575,3 +581,20 @@ https://www.rfc-editor.org/rfc/rfc4122#section-4.4
|
|||
Returns error code if generating of random number fails.
|
||||
|
||||
|
||||
.. c:function:: bool nvme_ipaddrs_eq (const char *addr1, const char *addr2)
|
||||
|
||||
Check if 2 IP addresses are equal.
|
||||
|
||||
**Parameters**
|
||||
|
||||
``const char *addr1``
|
||||
IP address (can be IPv4 or IPv6)
|
||||
|
||||
``const char *addr2``
|
||||
IP address (can be IPv4 or IPv6)
|
||||
|
||||
**Return**
|
||||
|
||||
true if addr1 == addr2. false otherwise.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue