Top |
void
bd_nvme_close (void
);
Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**
gboolean
bd_nvme_init (void
);
Initializes the plugin. **This function is called automatically by the library's initialization functions.**
gboolean bd_nvme_is_tech_avail (BDNVMETech tech
,guint64 mode
,GError **error
);
tech |
the queried tech |
|
mode |
a bit mask of queried modes of operation (BDNVMETechMode) for |
|
error |
place to store error (details about why the |
[out][nullable] |
BDNVMEControllerInfo * bd_nvme_get_controller_info (const gchar *device
,GError **error
);
Retrieves information about the NVMe controller (the Identify Controller command)
as specified by the device
block device path.
device |
a NVMe controller device (e.g. |
|
error |
place to store error (if any). |
[out][nullable] |
information about given controller or NULL
in case of an error (with error
set).
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_INFO
.
[transfer full]
void
bd_nvme_controller_info_free (BDNVMEControllerInfo *info
);
Frees info
.
[skip]
BDNVMEControllerInfo *
bd_nvme_controller_info_copy (BDNVMEControllerInfo *info
);
Creates a new copy of info
.
[skip]
BDNVMELBAFormat *
bd_nvme_lba_format_copy (BDNVMELBAFormat *fmt
);
Creates a new copy of fmt
.
[skip]
BDNVMENamespaceInfo * bd_nvme_get_namespace_info (const gchar *device
,GError **error
);
Retrieves information about the NVMe namespace (the Identify Namespace command)
as specified by the device
block device path.
device |
a NVMe namespace device (e.g. |
|
error |
place to store error (if any). |
[out][nullable] |
information about given namespace or NULL
in case of an error (with error
set).
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_INFO
.
[transfer full]
void
bd_nvme_namespace_info_free (BDNVMENamespaceInfo *info
);
Frees info
.
[skip]
BDNVMENamespaceInfo *
bd_nvme_namespace_info_copy (BDNVMENamespaceInfo *info
);
Creates a new copy of info
.
[skip]
BDNVMESmartLog * bd_nvme_get_smart_log (const gchar *device
,GError **error
);
Retrieves drive SMART and general health information (Log Identifier 02h
).
The information provided is over the life of the controller and is retained across power cycles.
device |
a NVMe controller device (e.g. |
|
error |
place to store error (if any). |
[out][nullable] |
health log data or NULL
in case of an error (with error
set).
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_INFO
.
[transfer full]
BDNVMESmartLog *
bd_nvme_smart_log_copy (BDNVMESmartLog *log
);
Creates a new copy of log
.
[skip]
BDNVMEErrorLogEntry ** bd_nvme_get_error_log_entries (const gchar *device
,GError **error
);
Retrieves Error Information Log (Log Identifier 01h
) entries, used to describe
extended error information for a command that completed with error or to report
an error that is not specific to a particular command. This log is global to the
controller. The ordering of the entries is based on the time when the error
occurred, with the most recent error being returned as the first log entry.
As the number of entries is typically limited by the drive implementation, only
most recent entries are provided.
device |
a NVMe controller device (e.g. |
|
error |
place to store error (if any). |
[out][nullable] |
null-terminated list
of error entries or NULL
in case of an error (with error
set).
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_INFO
.
[transfer full][array zero-terminated=1]
void
bd_nvme_error_log_entry_free (BDNVMEErrorLogEntry *entry
);
Frees entry
.
[skip]
BDNVMEErrorLogEntry *
bd_nvme_error_log_entry_copy (BDNVMEErrorLogEntry *entry
);
Creates a new copy of entry
.
[skip]
BDNVMESelfTestLog * bd_nvme_get_self_test_log (const gchar *device
,GError **error
);
Retrieves drive self-test log (Log Identifier 06h
). Provides the status of a self-test operation
in progress and the percentage complete of that operation, along with the results of the last
20 device self-test operations.
device |
a NVMe controller device (e.g. |
|
error |
place to store error (if any). |
[out][nullable] |
self-test log data or NULL
in case of an error (with error
set).
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_INFO
.
[transfer full]
void
bd_nvme_self_test_log_free (BDNVMESelfTestLog *log
);
Frees log
.
[skip]
BDNVMESelfTestLog *
bd_nvme_self_test_log_copy (BDNVMESelfTestLog *log
);
Creates a new copy of log
.
[skip]
void
bd_nvme_self_test_log_entry_free (BDNVMESelfTestLogEntry *entry
);
Frees entry
.
[skip]
BDNVMESelfTestLogEntry *
bd_nvme_self_test_log_entry_copy (BDNVMESelfTestLogEntry *entry
);
Creates a new copy of entry
.
[skip]
const gchar * bd_nvme_self_test_result_to_string (BDNVMESelfTestResult result
,GError **error
);
gboolean bd_nvme_device_self_test (const gchar *device
,BDNVMESelfTestAction action
,GError **error
);
Initiates or aborts the Device Self-test operation on the controller or a namespace,
distinguished by the device
path specified. In case a controller device
is specified then the self-test operation would include all active namespaces.
To abort a running operation, pass BD_NVME_SELF_TEST_ACTION_ABORT as action
.
To retrieve progress of a current running operation, check the self-test log using
bd_nvme_get_self_test_log()
.
device |
a NVMe controller or namespace device (e.g. |
|
action |
self-test action to take. |
|
error |
place to store error (if any). |
[out][nullable] |
TRUE
if the device self-test command was issued successfully,
FALSE
otherwise with error
set.
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_MANAGE
gboolean bd_nvme_format (const gchar *device
,guint16 lba_data_size
,guint16 metadata_size
,BDNVMEFormatSecureErase secure_erase
,GError **error
);
Performs low level format of the NVM media, destroying all data and metadata for either a specific namespace or all attached namespaces to the controller. Use this command to change LBA sector size. Optional secure erase method can be specified as well.
Supported LBA data sizes for a given namespace can be listed using the bd_nvme_get_namespace_info()
call. In case of a special value 0
the current LBA format for a given namespace will be
retained. When called on a controller device the first namespace is used as a reference.
Note that the NVMe controller may define a Format NVM attribute indicating that the format
operation would apply to all namespaces and a format (excluding secure erase) of any
namespace results in a format of all namespaces in the NVM subsystem. In such case and
when device
is a namespace block device the BD_NVME_ERROR_WOULD_FORMAT_ALL_NS error
is returned to prevent further damage. This is then supposed to be handled by the caller
and bd_nvme_format()
is supposed to be called on a controller device instead.
This call blocks until the format operation has finished. To retrieve progress
of a current running operation, check the namespace info using bd_nvme_get_namespace_info()
.
device |
NVMe namespace or controller device to format (e.g. |
|
lba_data_size |
desired LBA data size (i.e. a sector size) in bytes or |
|
metadata_size |
desired metadata size in bytes or |
|
secure_erase |
optional secure erase action to take. |
|
error |
place to store error (if any). |
[out][nullable] |
TRUE
if the format command finished successfully, FALSE
otherwise with error
set.
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_MANAGE
BDNVMESanitizeLog * bd_nvme_get_sanitize_log (const gchar *device
,GError **error
);
Retrieves the drive sanitize status log (Log Identifier 81h
) that includes information
about the most recent sanitize operation and the sanitize operation time estimates.
As advised in the NVMe specification whitepaper the host should limit polling to retrieve progress of a running sanitize operations (e.g. to at most once every several minutes) to avoid interfering with the progress of the sanitize operation itself.
device |
a NVMe controller device (e.g. |
|
error |
place to store error (if any). |
[out][nullable] |
sanitize log data or NULL
in case of an error (with error
set).
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_INFO
.
[transfer full]
void
bd_nvme_sanitize_log_free (BDNVMESanitizeLog *log
);
Frees log
.
[skip]
BDNVMESanitizeLog *
bd_nvme_sanitize_log_copy (BDNVMESanitizeLog *log
);
Creates a new copy of log
.
[skip]
gboolean bd_nvme_sanitize (const gchar *device
,BDNVMESanitizeAction action
,gboolean no_dealloc
,gint overwrite_pass_count
,guint32 overwrite_pattern
,gboolean overwrite_invert_pattern
,GError **error
);
Starts a sanitize operation or recovers from a previously failed sanitize operation. By definition, a sanitize operation alters all user data in the NVM subsystem such that recovery of any previous user data from any cache, the non-volatile media, or any Controller Memory Buffer is not possible. The scope of a sanitize operation is all locations in the NVM subsystem that are able to contain user data, including caches, Persistent Memory Regions, and unallocated or deallocated areas of the media.
Once started, a sanitize operation is not able to be aborted and continues after
a Controller Level Reset including across power cycles. Once the sanitize operation
has run the media affected may not be immediately ready for use unless additional
media modification mechanism is run. This is often vendor specific and also depends
on the sanitize method (action
) used. Callers to this sanitize operation should
set no_dealloc
to TRUE
for the added convenience.
The controller also ignores Critical Warning(s) in the SMART / Health Information log page (e.g., read only mode) and attempts to complete the sanitize operation requested.
This call returns immediately and the actual sanitize operation is performed
in the background. Use bd_nvme_get_sanitize_log()
to retrieve status and progress
of a running sanitize operation. In case a sanitize operation fails the controller
may restrict its operation until a subsequent sanitize operation is started
(i.e. retried) or an BD_NVME_SANITIZE_ACTION_EXIT_FAILURE action is used
to acknowledge the failure explicitly.
The overwrite_pass_count
, overwrite_pattern
and overwrite_invert_pattern
arguments are only valid when action
is BD_NVME_SANITIZE_ACTION_OVERWRITE.
The sanitize operation is set to run under the Allow Unrestricted Sanitize Exit mode.
device |
NVMe namespace or controller device to format (e.g. |
|
action |
the sanitize action to perform. |
|
no_dealloc |
instruct the controller to not deallocate the affected media area. |
|
overwrite_pass_count |
number of overwrite passes [1-15] or 0 for the default (16 passes). |
|
overwrite_pattern |
a 32-bit pattern used for the Overwrite sanitize operation. |
|
overwrite_invert_pattern |
invert the overwrite pattern between passes. |
|
error |
place to store error (if any). |
[out][nullable] |
TRUE
if the format command finished successfully, FALSE
otherwise with error
set.
Tech category: BD_NVME_TECH_NVME
-BD_NVME_TECH_MODE_MANAGE
gchar *
bd_nvme_get_host_nqn (GError **error
);
Reads the Host NQN (NVM Qualified Name) value from the global /etc/nvme/hostnqn
file. An empty string is an indication that no Host NQN has been set.
the Host NQN string or an empty string if none set.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
.
[transfer full]
gchar *
bd_nvme_get_host_id (GError **error
);
Reads the Host ID value from the global /etc/nvme/hostid
file. An empty
string is an indication that no Host ID has been set.
the Host ID string or an empty string if none set.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
.
[transfer full]
gchar *
bd_nvme_generate_host_nqn (GError **error
);
Compute new Host NQN (NVM Qualified Name) value for the current system. This takes in account various system identifiers (DMI, device tree) with the goal of a stable unique identifier whenever feasible.
the Host NQN string or NULL
with error
set.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
.
[transfer full]
gboolean bd_nvme_set_host_nqn (const gchar *host_nqn
,GError **error
);
Writes the Host NQN (NVM Qualified Name) value to the system /etc/nvme/hostnqn
file.
No validation of the string is performed.
host_nqn |
The Host NVM Qualified Name. |
|
error |
Place to store error (if any). |
[out][nullable] |
TRUE
if the value was set successfully or FALSE
otherwise with error
set.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
gboolean bd_nvme_set_host_id (const gchar *host_id
,GError **error
);
Writes the Host ID value to the system /etc/nvme/hostid
file.
No validation of the string is performed.
TRUE
if the value was set successfully or FALSE
otherwise with error
set.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
gboolean bd_nvme_connect (const gchar *subsysnqn
,const gchar *transport
,const gchar *transport_addr
,const gchar *transport_svcid
,const gchar *host_traddr
,const gchar *host_iface
,const gchar *host_nqn
,const gchar *host_id
,const BDExtraArg **extra
,GError **error
);
Creates a transport connection to a remote system (specified by transport_addr
and transport_svcid
)
and creates a NVMe over Fabrics controller for the NVMe subsystem specified by the subsysnqn
option.
Valid values for transport
include:
"rdma"
: An rdma network (RoCE, iWARP, Infiniband, basic rdma, etc.)
"fc"
: A Fibre Channel network.
"tcp"
: A TCP/IP network.
"loop"
: A NVMe over Fabrics target on the local host.
In addition to the primary options it's possible to supply extra
arguments:
"config"
: Use the specified JSON configuration file instead of the default file (see below) or
specify "none"
to avoid reading any configuration file.
"dhchap_key"
: NVMe In-band authentication secret in ASCII format as described
in the NVMe 2.0 specification. When not specified, the secret is by default read
from /etc/nvme/hostkey
. In case that file does not exist no in-band authentication
is attempted.
"dhchap_ctrl_key"
: NVMe In-band authentication controller secret for bi-directional authentication.
When not specified, no bi-directional authentication is attempted.
"nr_io_queues"
: The number of I/O queues.
"nr_write_queues"
: Number of additional queues that will be used for write I/O.
"nr_poll_queues"
: Number of additional queues that will be used for polling latency sensitive I/O.
"queue_size"
: Number of elements in the I/O queues.
"keep_alive_tmo"
: The keep alive timeout (in seconds).
"reconnect_delay"
: The delay (in seconds) before reconnect is attempted after a connect loss.
"ctrl_loss_tmo"
: The controller loss timeout period (in seconds). A special value of -1
will cause reconnecting forever.
"fast_io_fail_tmo"
: Fast I/O Fail timeout (in seconds).
"tos"
: Type of service.
"duplicate_connect"
: Allow duplicated connections between same transport host and subsystem port. Boolean value.
"disable_sqflow"
: Disables SQ flow control to omit head doorbell update for submission queues when sending nvme completions. Boolean value.
"hdr_digest"
: Generates/verifies header digest (TCP). Boolean value.
"data_digest"
: Generates/verifies data digest (TCP). Boolean value.
"tls"
: Enable TLS encryption (TCP). Boolean value.
"hostsymname"
: TP8010: NVMe host symbolic name.
"keyring"
: Keyring to store and lookup keys. String value.
"tls_key"
: TLS PSK for the connection. String value.
Boolean values can be expressed by "0"/"1", "on"/"off" or "True"/"False" case-insensitive strings. Failed numerical or boolean string conversions will result in the option being ignored.
By default additional options are read from the default configuration file /etc/nvme/config.json
.
This follows the default behaviour of nvme-cli
. Use the extra
"config"
argument
to either specify a different config file or disable use of it. The JSON configuration
file format is documented in https://raw.githubusercontent.com/linux-nvme/libnvme/master/doc/config-schema.json.
As a rule extra
key names are kept consistent with the JSON config file schema.
Any extra
option generally overrides particular option specified in a configuration file.
subsysnqn |
The name for the NVMe subsystem to connect to. |
|
transport |
The network fabric used for a NVMe-over-Fabrics network. |
|
transport_addr |
The network address of the Controller. For transports using IP addressing (e.g. |
[nullable] |
transport_svcid |
The transport service id. For transports using IP addressing (e.g. |
[nullable] |
host_traddr |
The network address used on the host to connect to the Controller. For TCP, this sets the source address on the socket. |
[nullable] |
host_iface |
The network interface used on the host to connect to the Controller (e.g. IP |
[nullable] |
host_nqn |
Overrides the default Host NQN that identifies the NVMe Host. If this option is |
[nullable] |
host_id |
User-defined host UUID or |
[nullable] |
extra |
Additional arguments. |
[nullable][array zero-terminated=1] |
error |
Place to store error (if any). |
[out][nullable] |
TRUE
if the subsystem was connected successfully, FALSE
otherwise with error
set.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
gboolean bd_nvme_disconnect (const gchar *subsysnqn
,GError **error
);
Disconnects and removes one or more existing NVMe over Fabrics controllers.
This may disconnect multiple controllers with matching subsysnqn
and TRUE
is only returned when all controllers were disconnected successfully.
subsysnqn |
The name of the NVMe subsystem to disconnect. |
|
error |
Place to store error (if any). |
[out][nullable] |
TRUE
if all matching controllers were disconnected successfully, FALSE
with error
set in case of a disconnect error or when no matching controllers were found.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
gboolean bd_nvme_disconnect_by_path (const gchar *path
,GError **error
);
Disconnects and removes a NVMe over Fabrics controller represented by a block device path.
path |
NVMe controller device to disconnect (e.g. |
|
error |
Place to store error (if any). |
[out][nullable] |
TRUE
if the controller was disconnected successfully,
FALSE
otherwise with error
set.
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
gchar ** bd_nvme_find_ctrls_for_ns (const gchar *ns_sysfs_path
,const gchar *subsysnqn
,const gchar *host_nqn
,const gchar *host_id
,GError **error
);
A convenient utility function to look up all controllers associated with a NVMe subsystem the specified namespace is part of.
ns_sysfs_path |
NVMe namespace device file. |
|
subsysnqn |
Limit matching to the specified subsystem NQN. |
[nullable] |
host_nqn |
Limit matching to the specified host NQN. |
[nullable] |
host_id |
Limit matching to the specified host ID. |
[nullable] |
error |
Place to store error (if any). |
[out][nullable] |
list of controller sysfs paths
or NULL
in case of an error (with error
set).
Tech category: BD_NVME_TECH_FABRICS
-BD_NVME_TECH_MODE_INITIATOR
.
[transfer full][array zero-terminated=1]
NVMe support not available. |
||
General error. |
||
The device is temporarily unavailable or in an inconsistent state. |
||
Invalid argument. |
||
The NVMe controller indicates that it would format all namespaces in the NVM subsystem. |
||
Generic NVMe Command Status Code. |
||
NVMe Command Specific error. |
||
Media and Data Integrity Errors: media specific errors that occur in the NVM or data integrity type errors. |
||
Path related error. |
||
NVMe Vendor specific error. |
||
No matching resource found (e.g. a Fabrics Controller). |
||
General connection error. |
||
Already connected. |
||
Invalid argument specified. |
||
HostNQN already in use. |
||
Invalid interface. |
||
Operation not supported. |
||
Connection refused. |
if set, then the NVM subsystem may contain more than one NVM subsystem port, otherwise it's single-port only. |
||
if set, then the NVM subsystem may contain two or more controllers, otherwise contains only single controller. |
||
if set, then the controller is associated with an SR-IOV Virtual Function, otherwise it's associated with a PCI Function or a Fabrics connection. |
||
indicates that the NVM subsystem supports Asymmetric Namespace Access (ANA) Reporting. |
||
indicates that the controller supports the Format NVM command. |
||
if set, then a format (excluding secure erase) of any namespace results in a format of all namespaces in an NVM subsystem with all namespaces in an NVM subsystem configured with the same attributes. If not set, then the controller supports format on a per namespace basis. |
||
indicates that the controller supports the Namespace Management and Attachment capability. |
||
indicates that the controller supports the Device Self-test command. |
||
indicates that the NVM subsystem supports only one device self-test operation in progress at a time. |
||
indicates that the controller supports the Crypto Erase sanitize operation. |
||
indicates that the controller supports the Block Erase sanitize operation. |
||
indicates that the controller supports the Overwrite sanitize operation. |
||
if set, then any secure erase performed as part of a format operation results in a secure erase of all namespaces in the NVM subsystem. If not set, then any secure erase performed as part of a format results in a secure erase of the particular namespace specified. |
||
indicates that the cryptographic erase is supported. |
||
indicates that the NVM subsystem is part of an NVMe Storage Device. |
||
indicates that the NVM subsystem is part of an NVMe Enclosure. |
||
indicates that the NVM subsystem contains a Management Endpoint on a PCIe port. |
||
indicates that the NVM subsystem contains a Management Endpoint on an SMBus/I2C port. |
typedef struct { guint16 pci_vendor_id; guint16 pci_subsys_vendor_id; guint16 ctrl_id; gchar *fguid; gchar *model_number; gchar *serial_number; gchar *firmware_ver; gchar *nvme_ver; guint64 features; BDNVMEControllerType controller_type; gint selftest_ext_time; guint64 hmb_pref_size; guint64 hmb_min_size; guint64 size_total; guint64 size_unalloc; guint num_namespaces; gchar *subsysnqn; } BDNVMEControllerInfo;
The PCI Vendor ID. |
||
The PCI Subsystem Vendor ID. |
||
Controller ID, the NVM subsystem unique controller identifier associated with the controller. |
||
FRU GUID, a 128-bit value that is globally unique for a given Field Replaceable Unit. |
||
The model number. |
||
The serial number. |
||
The currently active firmware revision. |
||
The NVM Express base specification that the controller implementation supports or |
||
features and capabilities present for this controller, see BDNVMEControllerFeature. |
||
BDNVMEControllerType |
The controller type. |
|
Extended Device Self-test Time, if BD_NVME_CTRL_FEAT_SELFTEST is supported then this field indicates the nominal amount of time in one minute units that the controller takes to complete an extended device self-test operation when in power state 0. |
||
Host Memory Buffer Preferred Size indicates the preferred size that the host is requested to allocate for the Host Memory Buffer feature in bytes. |
||
Host Memory Buffer Minimum Size indicates the minimum size that the host is requested to allocate for the Host Memory Buffer feature in bytes. |
||
Total NVM Capacity in the NVM subsystem in bytes. |
||
Unallocated NVM Capacity in the NVM subsystem in bytes. |
||
Maximum Number of Allowed Namespaces supported by the NVM subsystem. |
||
NVM Subsystem NVMe Qualified Name, UTF-8 null terminated string. |
typedef struct { guint16 data_size; guint16 metadata_size; BDNVMELBAFormatRelativePerformance relative_performance; } BDNVMELBAFormat;
LBA data size (i.e. a sector size) in bytes. |
||
metadata size in bytes or |
||
BDNVMELBAFormatRelativePerformance |
Relative Performance index, see BDNVMELBAFormatRelativePerformance. |
indicates that the namespace supports thin provisioning. Specifically, the Namespace Capacity reported may be less than the Namespace Size. |
||
indicates the capability to attach the namespace to two or more controllers in the NVM subsystem concurrently. |
||
indicates the capability to report the percentage of the namespace that remains to be formatted. |
||
indicates a rotational medium. |
typedef struct { guint32 nsid; gchar *eui64; gchar *uuid; gchar *nguid; guint64 nsize; guint64 ncap; guint64 nuse; guint64 features; guint8 format_progress_remaining; gboolean write_protected; BDNVMELBAFormat **lba_formats; BDNVMELBAFormat current_lba_format; } BDNVMENamespaceInfo;
The Namespace Identifier (NSID). |
||
IEEE Extended Unique Identifier: a 64-bit IEEE Extended Unique Identifier (EUI-64) that is globally unique and assigned to the namespace when the namespace is created. Remains fixed throughout the life of the namespace and is preserved across namespace and controller operations. |
||
Namespace 128-bit Universally Unique Identifier (UUID) as specified in RFC 4122. |
||
Namespace Globally Unique Identifier: a 128-bit value that is globally unique and assigned to the namespace when the namespace is created. Remains fixed throughout the life of the namespace and is preserved across namespace and controller operations. |
||
Namespace Size: total size of the namespace in logical blocks. The number of logical blocks
is based on the formatted LBA size (see |
||
Namespace Capacity: 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 (see |
||
Namespace Utilization: current number of logical blocks allocated in the namespace.
This field is smaller than or equal to the Namespace Capacity. The number of logical
blocks is based on the formatted LBA size (see |
||
features and capabilities present for this namespace, see BDNVMENamespaceFeature. |
||
The percentage value remaining of a format operation in progress. |
||
|
||
BDNVMELBAFormat ** |
A list of supported LBA Formats. |
[array zero-terminated=1] |
BDNVMELBAFormat |
A LBA Format currently used for the namespace. Contains zeroes in case of an invalid or no supported LBA Format reported. |
the available spare capacity has fallen below the threshold. |
||
a temperature is either greater than or equal to an over temperature threshold; or less than or equal to an under temperature threshold. |
||
the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability. |
||
all of the media has been placed in read only mode. Unrelated to the write protection state of a namespace. |
||
the volatile memory backup device has failed. Valid only if the controller has a volatile memory backup solution. |
||
Persistent Memory Region has become read-only or unreliable. |
typedef struct { guint critical_warning; guint8 avail_spare; guint8 spare_thresh; guint8 percent_used; guint64 total_data_read; guint64 total_data_written; guint64 ctrl_busy_time; guint64 power_cycles; guint64 power_on_hours; guint64 unsafe_shutdowns; guint64 media_errors; guint64 num_err_log_entries; guint16 temperature; guint16 temp_sensors[8]; guint16 wctemp; guint16 cctemp; guint warning_temp_time; guint critical_temp_time; } BDNVMESmartLog;
critical warnings for the state of the controller, see BDNVMESmartCriticalWarning. |
||
Available Spare: a normalized percentage (0% to 100%) of the remaining spare capacity available. |
||
Available Spare Threshold: a normalized percentage (0% to 100%) of the available spare threshold. |
||
Percentage Used: a vendor specific estimate of the percentage drive life used based on the actual usage and the manufacturer's prediction. A value of 100 indicates that the estimated endurance has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. |
||
An estimated calculation of total data read in bytes based on calculation of data units read from the host. A value of 0 indicates that the number of Data Units Read is not reported. |
||
An estimated calculation of total data written in bytes based on calculation of data units written by the host. A value of 0 indicates that the number of Data Units Written is not reported. |
||
Amount of time the controller is busy with I/O commands, reported in minutes. |
||
The number of power cycles. |
||
The number of power-on hours, excluding a non-operational power state. |
||
The number of unsafe shutdowns as a result of a Shutdown Notification not received prior to loss of power. |
||
Media and Data Integrity Errors: the number of occurrences where the controller detected an unrecovered data integrity error (e.g. uncorrectable ECC, CRC checksum failure, or LBA tag mismatch). |
||
Number of Error Information Log Entries: the number of Error Information log entries over the life of the controller. |
||
Composite Temperature: temperature in Kelvins that represents the current composite temperature of the controller and associated namespaces or 0 when not applicable. |
||
Temperature Sensor 1-8: array of the current temperature reported by temperature sensors 1-8 in Kelvins or 0 when the particular sensor is not available. |
||
Warning Composite Temperature Threshold (WCTEMP): indicates the minimum Composite Temperature ( |
||
Critical Composite Temperature Threshold (CCTEMP): indicates the minimum Composite Temperature ( |
||
Warning Composite Temperature Time: the amount of time in minutes that the Composite Temperature ( |
||
Critical Composite Temperature Time: the amount of time in minutes that the Composite Temperature ( |
typedef struct { guint64 error_count; guint16 command_id; guint64 command_specific; guint16 command_status; GError *command_error; guint64 lba; guint32 nsid; BDNVMETransportType transport_type; } BDNVMEErrorLogEntry;
internal error counter, a unique identifier for the error. |
||
the Command Identifier of the command that the error is associated with or |
||
Command Specific Information specific to |
||
the Status code for the command that completed. |
||
translated command error in the BD_NVME_ERROR domain or |
||
the first LBA that experienced the error condition. |
||
the NSID of the namespace that the error is associated with. |
||
BDNVMETransportType |
type of the transport associated with the error. |
typedef struct { BDNVMESelfTestAction current_operation; guint8 current_operation_completion; BDNVMESelfTestLogEntry **entries; } BDNVMESelfTestLog;
BDNVMESelfTestAction |
Current running device self-test operation. There's no corresponding record in |
|
Percentage of the currently running device self-test operation. Only valid when |
||
BDNVMESelfTestLogEntry ** |
Self-test log entries for the last 20 operations, sorted from newest (first element) to oldest. |
[array zero-terminated=1] |
typedef struct { BDNVMESelfTestResult result; BDNVMESelfTestAction action; guint8 segment; guint64 power_on_hours; guint32 nsid; guint64 failing_lba; GError *status_code_error; } BDNVMESelfTestLogEntry;
BDNVMESelfTestResult |
Result of the device self-test operation. |
|
BDNVMESelfTestAction |
The Self-test Code value (action) that was specified in the Device Self-test command that started this device self-test operation. |
|
Segment number where the first self-test failure occurred. Valid only when |
||
Number of power-on hours at the time the device self-test operation was completed or aborted. Does not include time that the controller was powered and in a low power state condition. |
||
Namespace ID that the Failing LBA occurred on. |
||
LBA of the logical block that caused the test to fail. If the device encountered more than one failed logical block during the test, then this field only indicates one of those failed logical blocks. |
||
Translated NVMe Command Status Code representing additional information related to errors or conditions. |
No device self-test operation in progress. Not a valid argument for |
||
Start a short device self-test operation. |
||
Start an extended device self-test operation. |
||
Start a vendor specific device self-test operation. |
||
Abort the device self-test operation. Only valid for |
Operation completed without error. |
||
Operation was aborted by a Device Self-test command. |
||
Operation was aborted by a Controller Level Reset. |
||
Operation was aborted due to a removal of a namespace from the namespace inventory. |
||
Operation was aborted due to the processing of a Format NVM command. |
||
A fatal error or unknown test error occurred while the controller was executing the device self-test operation and the operation did not complete. |
||
Operation completed with a segment that failed and the segment that failed is not known. |
||
Operation completed with one or more failed segments and the first segment that failed is indicated in the Segment Number field. |
||
Operation was aborted for unknown reason. |
||
Operation was aborted due to a sanitize operation. |
No secure erase operation requested. |
||
User Data Erase: All user data shall be erased, contents of the user data after the erase is indeterminate (e.g., the user data may be zero filled, one filled, etc.). If a User Data Erase is requested and all affected user data is encrypted, then the controller is allowed to use a cryptographic erase to perform the requested User Data Erase. |
||
Cryptographic Erase: All user data shall be erased cryptographically. This is accomplished by deleting the encryption key. |
The NVM subsystem has never been sanitized. |
||
A sanitize operation is currently in progress. |
||
The most recent sanitize operation completed successfully including any additional media modification. |
||
The most recent sanitize operation for which No-Deallocate After Sanitize was requested has completed successfully with deallocation of all user data. |
||
The most recent sanitize operation failed. |
typedef struct { gdouble sanitize_progress; BDNVMESanitizeStatus sanitize_status; gboolean global_data_erased; guint8 overwrite_passes; gint64 time_for_overwrite; gint64 time_for_block_erase; gint64 time_for_crypto_erase; gint64 time_for_overwrite_nd; gint64 time_for_block_erase_nd; gint64 time_for_crypto_erase_nd; } BDNVMESanitizeLog;
The percentage complete of the sanitize operation. |
||
BDNVMESanitizeStatus |
The status of the most recent sanitize operation. |
|
Indicates that no user data has been written either since the drive was manufactured and has never been sanitized or since the most recent successful sanitize operation. |
||
Number of completed passes if the most recent sanitize operation was an Overwrite. |
||
Estimated time in seconds needed to complete an Overwrite sanitize operation with 16 passes in the background. A value of -1 means that no time estimate is reported. A value of 0 means that the operation is expected to be completed in the background when the Sanitize command is completed. |
||
Estimated time in seconds needed to complete a Block Erase sanitize operation in the background. A value of -1 means that no time estimate is reported. A value of 0 means that the operation is expected to be completed in the background when the Sanitize command is completed. |
||
Estimated time in seconds needed to complete a Crypto Erase sanitize operation in the background. A value of -1 means that no time estimate is reported. A value of 0 means that the operation is expected to be completed in the background when the Sanitize command is completed. |
||
Estimated time in seconds needed to complete an Overwrite sanitize operation and the associated additional media modification in the background when the No-Deallocate After Sanitize or the No-Deallocate Modifies Media After Sanitize features have been requested. |
||
Estimated time in seconds needed to complete a Block Erase sanitize operation and the associated additional media modification in the background when the No-Deallocate After Sanitize or the No-Deallocate Modifies Media After Sanitize features have been requested. |
||
Estimated time in seconds needed to complete a Crypto Erase sanitize operation and the associated additional media modification in the background when the No-Deallocate After Sanitize or the No-Deallocate Modifies Media After Sanitize features have been requested. |
Exit Failure Mode. |
||
Start a Block Erase sanitize operation - a low-level block erase method that is specific to the media. |
||
Start an Overwrite sanitize operation - writing a fixed data pattern or related patterns in multiple passes. |
||
Start a Crypto Erase sanitize operation - changing the media encryption keys for all locations on the media. |