title: nvme_refresh_topology(2)

summary: Refresh nvme_root_t object contents

text:
# nvme_refresh_topology(2)

## NAME
nvme_refresh_topology - Refresh nvme_root_t object contents

## SYNOPSIS
void nvme_refresh_topology (nvme_root_t r );

## ARGUMENTS
r

nvme_root_t object

## DESCRIPTION
Removes all elements in r and rescans the existing topology.


package: libnvme-devel

title: nvme_register_offsets(2)

text:
# nvme_register_offsets(2)

## NAME
enum nvme_register_offsets - controller registers for all transports. This is the layout of BAR0/1 for PCIe, and properties for fabrics.

## SYNOPSIS
enum nvme_register_offsets {

NVME_REG_CAP ,

NVME_REG_VS ,

NVME_REG_INTMS ,

NVME_REG_INTMC ,

NVME_REG_CC ,

NVME_REG_CSTS ,

NVME_REG_NSSR ,

NVME_REG_AQA ,

NVME_REG_ASQ ,

NVME_REG_ACQ ,

NVME_REG_CMBLOC ,

NVME_REG_CMBSZ ,

NVME_REG_BPINFO ,

NVME_REG_BPRSEL ,

NVME_REG_BPMBL ,

NVME_REG_CMBMSC ,

NVME_REG_CMBSTS ,

NVME_REG_CMBEBS ,

NVME_REG_CMBSWTP ,

NVME_REG_NSSD ,

NVME_REG_CRTO ,

NVME_REG_PMRCAP ,

NVME_REG_PMRCTL ,

NVME_REG_PMRSTS ,

NVME_REG_PMREBS ,

NVME_REG_PMRSWTP ,

NVME_REG_PMRMSCL ,

NVME_REG_PMRMSCU

};

## Constants
NVME_REG_CAP

Controller Capabilities

NVME_REG_VS

Version

NVME_REG_INTMS

Interrupt Mask Set

NVME_REG_INTMC

Interrupt Mask Clear

NVME_REG_CC

Controller Configuration

NVME_REG_CSTS

Controller Status

NVME_REG_NSSR

NVM Subsystem Reset

NVME_REG_AQA

Admin Queue Attributes

NVME_REG_ASQ

Admin SQ Base Address

NVME_REG_ACQ

Admin CQ Base Address

NVME_REG_CMBLOC

Controller Memory Buffer Location

NVME_REG_CMBSZ

Controller Memory Buffer Size

NVME_REG_BPINFO

Boot Partition Information

NVME_REG_BPRSEL

Boot Partition Read Select

NVME_REG_BPMBL

Boot Partition Memory Buffer Location

NVME_REG_CMBMSC

Controller Memory Buffer Memory Space Control

NVME_REG_CMBSTS

Controller Memory Buffer Status

NVME_REG_CMBEBS

Controller Memory Buffer Elasticity Buffer Size

NVME_REG_CMBSWTP

Controller Memory Buffer Sustained Write Throughput

NVME_REG_NSSD

NVM Subsystem Shutdown

NVME_REG_CRTO

Controller Ready Timeouts

NVME_REG_PMRCAP

Persistent Memory Capabilities

NVME_REG_PMRCTL

Persistent Memory Region Control

NVME_REG_PMRSTS

Persistent Memory Region Status

NVME_REG_PMREBS

Persistent Memory Region Elasticity Buffer Size

NVME_REG_PMRSWTP

Memory Region Sustained Write Throughput

NVME_REG_PMRMSCL

Persistent Memory Region Controller Memory Space Control Lower

NVME_REG_PMRMSCU

Persistent Memory Region Controller Memory Space Control Upper

branch: sisyphus


title: nvme_registered_ctrl(2)

summary: Registered Controller Data Structure

text:
# nvme_registered_ctrl(2)

## NAME
struct nvme_registered_ctrl - Registered Controller Data Structure

## SYNOPSIS
struct nvme_registered_ctrl {

__le16 cntlid;

__u8 rcsts;

__u8 rsvd3[5];

__le64 hostid;

__le64 rkey;

};

## Members
cntlid

Controller ID

rcsts

Reservation Status

rsvd3

Reserved

hostid

Host Identifier

rkey

Reservation Key


title: nvme_registered_ctrl_ext(2)

text:
# nvme_registered_ctrl_ext(2)

## NAME
struct nvme_registered_ctrl_ext - Registered Controller Extended Data Structure

## SYNOPSIS
struct nvme_registered_ctrl_ext {

__le16 cntlid;

__u8 rcsts;

__u8 rsvd3[5];

__le64 rkey;

__u8 hostid[16];

__u8 rsvd32[32];

};

## Members
cntlid

Controller ID

rcsts

Reservation Status

rsvd3

Reserved

rkey

Reservation Key

hostid

Host Identifier

rsvd32

Reserved


title: nvme_rescan_ctrl(2)

summary: Rescan an existing controller

text:
# nvme_rescan_ctrl(2)

## NAME
nvme_rescan_ctrl - Rescan an existing controller

## SYNOPSIS
void nvme_rescan_ctrl (nvme_ctrl_t c );

## ARGUMENTS
c

Controller instance


title: nvme_resv_acquire(2)

summary: Send an nvme reservation acquire

text:
# nvme_resv_acquire(2)

## NAME
nvme_resv_acquire - Send an nvme reservation acquire

## SYNOPSIS
int nvme_resv_acquire (struct nvme_resv_acquire_args *args );

## ARGUMENTS
args

struct nvme_resv_acquire argument structure

## DESCRIPTION
The Reservation Acquire command acquires a reservation on a namespace, preempt a reservation held on a namespace, and abort a reservation held on a namespace.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_resv_acquire_args(2)

text:
# nvme_resv_acquire_args(2)

## NAME
struct nvme_resv_acquire_args - Arguments for the NVMe Reservation Acquire Command

## SYNOPSIS
struct nvme_resv_acquire_args {

__u64 crkey;

__u64 nrkey;

__u32 *result;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

enum nvme_resv_rtype rtype;

enum nvme_resv_racqa racqa;

bool iekey;

};

## Members
crkey

The current reservation key associated with the host

nrkey

The reservation key to be unregistered from the namespace if the action is preempt

result

The command completion result from CQE dword0

args_size

Size of struct nvme_resv_acquire_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace identifier

rtype

The type of reservation to be create, see enum nvme_resv_rtype

racqa

The action that is performed by the command, see enum nvme_resv_racqa

iekey

Set to ignore the existing key


title: nvme_resv_cptpl(2)

text:
# nvme_resv_cptpl(2)

## NAME
enum nvme_resv_cptpl - Reservation Register - Change Persist Through Power Loss State

## SYNOPSIS
enum nvme_resv_cptpl {

NVME_RESERVATION_CPTPL_NO_CHANGE ,

NVME_RESERVATION_CPTPL_CLEAR ,

NVME_RESERVATION_CPTPL_PERSIST

};

## Constants
NVME_RESERVATION_CPTPL_NO_CHANGE

No change to PTPL state

NVME_RESERVATION_CPTPL_CLEAR

Reservations are released and registrants are cleared on a power on

NVME_RESERVATION_CPTPL_PERSIST

Reservations and registrants persist across a power loss


title: nvme_resv_notification_log(2)

summary: Reservation Notification Log

text:
# nvme_resv_notification_log(2)

## NAME
struct nvme_resv_notification_log - Reservation Notification Log

## SYNOPSIS
struct nvme_resv_notification_log {

__le64 lpc;

__u8 rnlpt;

__u8 nalp;

__u8 rsvd9[2];

__le32 nsid;

__u8 rsvd16[48];

};

## Members
lpc

Log Page Count

rnlpt

See enum nvme_resv_notify_rnlpt.

nalp

Number of Available Log Pages

rsvd9

Reserved

nsid

Namespace ID

rsvd16

Reserved


title: nvme_resv_notify_rnlpt(2)

text:
# nvme_resv_notify_rnlpt(2)

## NAME
enum nvme_resv_notify_rnlpt - Reservation Notification Log - Reservation Notification Log Page Type

## SYNOPSIS
enum nvme_resv_notify_rnlpt {

NVME_RESV_NOTIFY_RNLPT_EMPTY ,

NVME_RESV_NOTIFY_RNLPT_REGISTRATION_PREEMPTED ,

NVME_RESV_NOTIFY_RNLPT_RESERVATION_RELEASED ,

NVME_RESV_NOTIFY_RNLPT_RESERVATION_PREEMPTED

};

## Constants
NVME_RESV_NOTIFY_RNLPT_EMPTY

Empty Log Page

NVME_RESV_NOTIFY_RNLPT_REGISTRATION_PREEMPTED

Registration Preempted

NVME_RESV_NOTIFY_RNLPT_RESERVATION_RELEASED

Reservation Released

NVME_RESV_NOTIFY_RNLPT_RESERVATION_PREEMPTED

Reservation Preempted


title: nvme_resv_racqa(2)

text:
# nvme_resv_racqa(2)

## NAME
enum nvme_resv_racqa - Reservation Acquire - Reservation Acquire Action

## SYNOPSIS
enum nvme_resv_racqa {

NVME_RESERVATION_RACQA_ACQUIRE ,

NVME_RESERVATION_RACQA_PREEMPT ,

NVME_RESERVATION_RACQA_PREEMPT_AND_ABORT

};

## Constants
NVME_RESERVATION_RACQA_ACQUIRE

Acquire

NVME_RESERVATION_RACQA_PREEMPT

Preempt

NVME_RESERVATION_RACQA_PREEMPT_AND_ABORT

Preempt and Abort


title: nvme_resv_register(2)

summary: Send an nvme reservation register

text:
# nvme_resv_register(2)

## NAME
nvme_resv_register - Send an nvme reservation register

## SYNOPSIS
int nvme_resv_register (struct nvme_resv_register_args *args );

## ARGUMENTS
args

struct nvme_resv_register_args argument structure

## DESCRIPTION
The Reservation Register command registers, unregisters, or replaces a reservation key.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_resv_register_args(2)

text:
# nvme_resv_register_args(2)

## NAME
struct nvme_resv_register_args - Arguments for the NVMe Reservation Register command

## SYNOPSIS
struct nvme_resv_register_args {

__u64 crkey;

__u64 nrkey;

__u32 *result;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

enum nvme_resv_rrega rrega;

enum nvme_resv_cptpl cptpl;

bool iekey;

};

## Members
crkey

The current reservation key associated with the host

nrkey

The new reservation key to be register if action is register or replace

result

The command completion result from CQE dword0

args_size

Size of struct nvme_resv_register_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace identifier

rrega

The registration action, see enum nvme_resv_rrega

cptpl

Change persist through power loss, see enum nvme_resv_cptpl

iekey

Set to ignore the existing key


title: nvme_resv_release(2)

summary: Send an nvme reservation release

text:
# nvme_resv_release(2)

## NAME
nvme_resv_release - Send an nvme reservation release

## SYNOPSIS
int nvme_resv_release (struct nvme_resv_release_args *args );

## ARGUMENTS
args

struct nvme_resv_release_args argument structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_resv_release_args(2)

text:
# nvme_resv_release_args(2)

## NAME
struct nvme_resv_release_args - Arguments for the NVMe Reservation Release Command

## SYNOPSIS
struct nvme_resv_release_args {

__u64 crkey;

__u32 *result;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

enum nvme_resv_rtype rtype;

enum nvme_resv_rrela rrela;

bool iekey;

};

## Members
crkey

The current reservation key to release

result

The command completion result from CQE dword0

args_size

Size of struct nvme_resv_release_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace identifier

rtype

The type of reservation to be create, see enum nvme_resv_rtype

rrela

Reservation release action, see enum nvme_resv_rrela

iekey

Set to ignore the existing key


title: nvme_resv_report(2)

summary: Send an nvme reservation report

text:
# nvme_resv_report(2)

## NAME
nvme_resv_report - Send an nvme reservation report

## SYNOPSIS
int nvme_resv_report (struct nvme_resv_report_args *args );

## ARGUMENTS
args

struct nvme_resv_report_args argument structure

## DESCRIPTION
Returns a Reservation Status data structure to memory that describes the registration and reservation status of a namespace. See the definition for the returned structure, struct nvme_reservation_status, for more details.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_resv_report_args(2)

text:
# nvme_resv_report_args(2)

## NAME
struct nvme_resv_report_args - Arguments for the NVMe Reservation Report command

## SYNOPSIS
struct nvme_resv_report_args {

__u32 *result;

struct nvme_resv_status *report;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

__u32 len;

bool eds;

};

## Members
result

The command completion result from CQE dword0

report

The user space destination address to store the reservation report

args_size

Size of struct nvme_resv_report_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace identifier

len

Number of bytes to request transferred with this command

eds

Request extended Data Structure


title: nvme_resv_rrega(2)

text:
# nvme_resv_rrega(2)

## NAME
enum nvme_resv_rrega - Reservation Register - Reservation Register Action

## SYNOPSIS
enum nvme_resv_rrega {

NVME_RESERVATION_RREGA_REGISTER_KEY ,

NVME_RESERVATION_RREGA_UNREGISTER_KEY ,

NVME_RESERVATION_RREGA_REPLACE_KEY

};

## Constants
NVME_RESERVATION_RREGA_REGISTER_KEY

Register Reservation Key

NVME_RESERVATION_RREGA_UNREGISTER_KEY

Unregister Reservation Key

NVME_RESERVATION_RREGA_REPLACE_KEY

Replace Reservation Key


title: nvme_resv_rrela(2)

text:
# nvme_resv_rrela(2)

## NAME
enum nvme_resv_rrela - Reservation Release - Reservation Release Action

## SYNOPSIS
enum nvme_resv_rrela {

NVME_RESERVATION_RRELA_RELEASE ,

NVME_RESERVATION_RRELA_CLEAR

};

## Constants
NVME_RESERVATION_RRELA_RELEASE

Release

NVME_RESERVATION_RRELA_CLEAR

Clear


title: nvme_resv_rtype(2)

summary: Reservation Type Encoding

text:
# nvme_resv_rtype(2)

## NAME
enum nvme_resv_rtype - Reservation Type Encoding

## SYNOPSIS
enum nvme_resv_rtype {

NVME_RESERVATION_RTYPE_WE ,

NVME_RESERVATION_RTYPE_EA ,

NVME_RESERVATION_RTYPE_WERO ,

NVME_RESERVATION_RTYPE_EARO ,

NVME_RESERVATION_RTYPE_WEAR ,

NVME_RESERVATION_RTYPE_EAAR

};

## Constants
NVME_RESERVATION_RTYPE_WE

Write Exclusive Reservation

NVME_RESERVATION_RTYPE_EA

Exclusive Access Reservation

NVME_RESERVATION_RTYPE_WERO

Write Exclusive - Registrants Only Reservation

NVME_RESERVATION_RTYPE_EARO

Exclusive Access - Registrants Only Reservation

NVME_RESERVATION_RTYPE_WEAR

Write Exclusive - All Registrants Reservation

NVME_RESERVATION_RTYPE_EAAR

Exclusive Access - All Registrants Reservation


title: nvme_resv_status(2)

summary: Reservation Status Data Structure

text:
# nvme_resv_status(2)

## NAME
struct nvme_resv_status - Reservation Status Data Structure

## SYNOPSIS
struct nvme_resv_status {

__le32 gen;

__u8 rtype;

__u8 regctl[2];

__u8 rsvd7[2];

__u8 ptpls;

__u8 rsvd10[14];

union {

struct {

__u8 rsvd24[40];

struct nvme_registered_ctrl_ext regctl_eds[0];

};

struct nvme_registered_ctrl regctl_ds[0];

};

};

## Members
gen

Generation

rtype

Reservation Type

regctl

Number of Registered Controllers

rsvd7

Reserved

ptpls

Persist Through Power Loss State

rsvd10

Reserved

{unnamed_union}

anonymous

{unnamed_struct}

anonymous

rsvd24

Reserved

regctl_eds

Registered Controller Extended Data Structure

regctl_ds

Registered Controller Data Structure


title: nvme_revoke_tls_key(2)

summary: Revoke TLS key from keyring

text:
# nvme_revoke_tls_key(2)

## NAME
nvme_revoke_tls_key - Revoke TLS key from keyring

## SYNOPSIS
long nvme_revoke_tls_key (const char *keyring , const char *key_type , const char *identity );

## ARGUMENTS
keyring

Keyring to use

key_type

Type of the key to revoke

identity

Key identity string

## RETURN
0 on success or on failure -1 with errno set.


title: nvme_rotational_media_info_log(2)

summary: Rotational Media Information Log

text:
# nvme_rotational_media_info_log(2)

## NAME
struct nvme_rotational_media_info_log - Rotational Media Information Log

## SYNOPSIS
struct nvme_rotational_media_info_log {

__le16 endgid;

__le16 numa;

__le16 nrs;

__u8 rsvd6[2];

__le32 spinc;

__le32 fspinc;

__le32 ldc;

__le32 fldc;

__u8 rsvd24[488];

};

## Members
endgid

Endurance Group Identifier

numa

Number of Actuators

nrs

Nominal Rotational Speed

rsvd6

Reserved

spinc

Spinup Count

fspinc

Failed Spinup Count

ldc

Load Count

fldc

Failed Load Count

rsvd24

Reserved


title: nvme_sanitize_compln_event(2)

summary: Sanitize Completion Event Data

text:
# nvme_sanitize_compln_event(2)

## NAME
struct nvme_sanitize_compln_event - Sanitize Completion Event Data

## SYNOPSIS
struct nvme_sanitize_compln_event {

__le16 sani_prog;

__le16 sani_status;

__le16 cmpln_info;

__u8 rsvd6[2];

};

## Members
sani_prog

Sanitize Progress

sani_status

Sanitize Status

cmpln_info

Completion Information

rsvd6

Reserved


title: nvme_sanitize_log_page(2)

summary: Sanitize Status (Log Identifier 81h)

text:
# nvme_sanitize_log_page(2)

## NAME
struct nvme_sanitize_log_page - Sanitize Status (Log Identifier 81h)

## SYNOPSIS
struct nvme_sanitize_log_page {

__le16 sprog;

__le16 sstat;

__le32 scdw10;

__le32 eto;

__le32 etbe;

__le32 etce;

__le32 etond;

__le32 etbend;

__le32 etcend;

__le32 etpvds;

__u8 ssi;

__u8 rsvd37[475];

};

## Members
sprog

Sanitize Progress (SPROG): indicates the fraction complete of the sanitize operation. The value is a numerator of the fraction complete that has 65,536 (10000h) as its denominator. This value shall be set to FFFFh if the sstat field is not set to NVME_SANITIZE_SSTAT_STATUS_IN_PROGESS.

sstat

Sanitize Status (SSTAT): indicates the status associated with the most recent sanitize operation. See enum nvme_sanitize_sstat.

scdw10

Sanitize Command Dword 10 Information (SCDW10): contains the value of the Command Dword 10 field of the Sanitize command that started the sanitize operation.

eto

Estimated Time For Overwrite: indicates the number of seconds required to complete an Overwrite sanitize operation with 16 passes in the background when the No-Deallocate Modifies Media After Sanitize field is not set to 10b. A value of 0h indicates that the sanitize operation is expected to be completed in the background when the Sanitize command that started that operation is completed. A value of FFFFFFFFh indicates that no time period is reported.

etbe

Estimated Time For Block Erase: indicates the number of seconds required to complete a Block Erase sanitize operation in the background when the No-Deallocate Modifies Media After Sanitize field is not set to 10b. A value of 0h indicates that the sanitize operation is expected to be completed in the background when the Sanitize command that started that operation is completed. A value of FFFFFFFFh indicates that no time period is reported.

etce

Estimated Time For Crypto Erase: indicates the number of seconds required to complete a Crypto Erase sanitize operation in the background when the No-Deallocate Modifies Media After Sanitize field is not set to 10b. A value of 0h indicates that the sanitize operation is expected to be completed in the background when the Sanitize command that started that operation is completed. A value of FFFFFFFFh indicates that no time period is reported.

etond

Estimated Time For Overwrite With No-Deallocate Media Modification: indicates the number of seconds required to complete an Overwrite sanitize operation and the associated additional media modification after the Overwrite sanitize operation in the background when the No-Deallocate After Sanitize bit was set to 1 in the Sanitize command that requested the Overwrite sanitize operation; and the No-Deallocate Modifies Media After Sanitize field is set to 10b. A value of 0h indicates that the sanitize operation is expected to be completed in the background when the Sanitize command that started that operation is completed. A value of FFFFFFFFh indicates that no time period is reported.

etbend

Estimated Time For Block Erase With No-Deallocate Media Modification: indicates the number of seconds required to complete a Block Erase sanitize operation and the associated additional media modification after the Block Erase sanitize operation in the background when the No-Deallocate After Sanitize bit was set to 1 in the Sanitize command that requested the Overwrite sanitize operation; and the No-Deallocate Modifies Media After Sanitize field is set to 10b. A value of 0h indicates that the sanitize operation is expected to be completed in the background when the Sanitize command that started that operation is completed. A value of FFFFFFFFh indicates that no time period is reported.

etcend

Estimated Time For Crypto Erase With No-Deallocate Media Modification: indicates the number of seconds required to complete a Crypto Erase sanitize operation and the associated additional media modification after the Crypto Erase sanitize operation in the background when the No-Deallocate After Sanitize bit was set to 1 in the Sanitize command that requested the Overwrite sanitize operation; and the No-Deallocate Modifies Media After Sanitize field is set to 10b. A value of 0h indicates that the sanitize operation is expected to be completed in the background when the Sanitize command that started that operation is completed. A value of FFFFFFFFh indicates that no time period is reported.

etpvds

Estimated Time For Post-Verification Deallocation State: indicates the number of seconds required to deallocate all media allocated for user data after exiting the Media Verification state (i.e., the time difference between entering and exiting the Post-Verification Deallocation state), if that state is entered as part of the sanitize operation. A value of FFFFFFFFh indicates that no time period is reported.

ssi

Sanitize State Information: indicate the state of the Sanitize Operation State Machine.

rsvd37

Reserved


title: nvme_sanitize_nvm(2)

summary: Start a sanitize operation

text:
# nvme_sanitize_nvm(2)

## NAME
nvme_sanitize_nvm - Start a sanitize operation

## SYNOPSIS
int nvme_sanitize_nvm (struct nvme_sanitize_nvm_args *args );

## ARGUMENTS
args

struct nvme_sanitize_nvm_args argument structure

## DESCRIPTION
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 Sanitize command starts a sanitize operation or to recover from a previously failed sanitize operation. The sanitize operation types that may be supported are Block Erase, Crypto Erase, and Overwrite. All sanitize operations are processed in the background, i.e., completion of the sanitize command does not indicate completion of the sanitize operation.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_sanitize_nvm_args(2)

text:
# nvme_sanitize_nvm_args(2)

## NAME
struct nvme_sanitize_nvm_args - Arguments for the NVMe Sanitize NVM command

## SYNOPSIS
struct nvme_sanitize_nvm_args {

__u32 *result;

int args_size;

int fd;

__u32 timeout;

enum nvme_sanitize_sanact sanact;

__u32 ovrpat;

bool ause;

__u8 owpass;

bool oipbp;

bool nodas;

bool emvs;

};

## Members
result

The command completion result from CQE dword0

args_size

Size of struct nvme_sanitize_nvm_args

fd

File descriptor of nvme device

timeout

Timeout in ms

sanact

Sanitize action, see enum nvme_sanitize_sanact

ovrpat

Overwrite pattern

ause

Set to allow unrestricted sanitize exit

owpass

Overwrite pass count

oipbp

Set to overwrite invert pattern between passes

nodas

Set to not deallocate blocks after sanitizing

emvs

Set to enter media verification state


title: nvme_sanitize_sanact(2)

summary: Sanitize Action

text:
# nvme_sanitize_sanact(2)

## NAME
enum nvme_sanitize_sanact - Sanitize Action

## SYNOPSIS
enum nvme_sanitize_sanact {

NVME_SANITIZE_SANACT_EXIT_FAILURE ,

NVME_SANITIZE_SANACT_START_BLOCK_ERASE ,

NVME_SANITIZE_SANACT_START_OVERWRITE ,

NVME_SANITIZE_SANACT_START_CRYPTO_ERASE ,

NVME_SANITIZE_SANACT_EXIT_MEDIA_VERIF

};

## Constants
NVME_SANITIZE_SANACT_EXIT_FAILURE

Exit Failure Mode.

NVME_SANITIZE_SANACT_START_BLOCK_ERASE

Start a Block Erase sanitize operation.

NVME_SANITIZE_SANACT_START_OVERWRITE

Start an Overwrite sanitize operation.

NVME_SANITIZE_SANACT_START_CRYPTO_ERASE

Start a Crypto Erase sanitize operation.

NVME_SANITIZE_SANACT_EXIT_MEDIA_VERIF

Exit Media Verification State


title: nvme_sanitize_ssi(2)

summary: Sanitize State Information (SSI)

text:
# nvme_sanitize_ssi(2)

## NAME
enum nvme_sanitize_ssi - Sanitize State Information (SSI)

## SYNOPSIS
enum nvme_sanitize_ssi {

NVME_SANITIZE_SSI_SANS_SHIFT ,

NVME_SANITIZE_SSI_SANS_MASK ,

NVME_SANITIZE_SSI_FAILS_SHIFT ,

NVME_SANITIZE_SSI_FAILS_MASK ,

NVME_SANITIZE_SSI_IDLE ,

NVME_SANITIZE_SSI_RESTRICT_PROCESSING ,

NVME_SANITIZE_SSI_RESTRICT_FAILURE ,

NVME_SANITIZE_SSI_UNRESTRICT_PROCESSING ,

NVME_SANITIZE_SSI_UNRESTRICT_FAILURE ,

NVME_SANITIZE_SSI_MEDIA_VERIFICATION ,

NVME_SANITIZE_SSI_POST_VERIF_DEALLOC

};

## Constants
NVME_SANITIZE_SSI_SANS_SHIFT

Shift amount to get the value of Sanitize State from Sanitize State Information (SSI) field.

NVME_SANITIZE_SSI_SANS_MASK

Mask to get the value of Sanitize State from Sanitize State Information (SSI) field.

NVME_SANITIZE_SSI_FAILS_SHIFT

Shift amount to get the value of Failure State from Sanitize State Information (SSI) field.

NVME_SANITIZE_SSI_FAILS_MASK

Mask to get the value of Failure State from Sanitize State Information (SSI) field.

NVME_SANITIZE_SSI_IDLE

No sanitize operation is in process.

NVME_SANITIZE_SSI_RESTRICT_PROCESSING

The Sanitize operation is in Restricted Processing State.

NVME_SANITIZE_SSI_RESTRICT_FAILURE

The Sanitize operation is in Restricted Failure State. This state is entered if sanitize processing was performed in the Restricted Processing state and sanitize processing failed or a failure occurred during deallocation of media allocated for user data in the Post-Verification Deallocation state.

NVME_SANITIZE_SSI_UNRESTRICT_PROCESSING

The Sanitize operation is in Unrestricted Processing State.

NVME_SANITIZE_SSI_UNRESTRICT_FAILURE

The Sanitize operation is in Unrestricted Failure State. This state is entered if sanitize processing was performed in the Unrestricted Processing state and sanitize processing failed or a failure occurred during deallocation of media allocated for user data in the Post-Verification.

NVME_SANITIZE_SSI_MEDIA_VERIFICATION

The Sanitize operation is in Media Verification State. In this state, the sanitize processing completed successfully, and all media allocated for user data in the sanitization target is readable by the host for purposes of verifying sanitization.

NVME_SANITIZE_SSI_POST_VERIF_DEALLOC

The Sanitize operation is in Post-Verification Deallocation State. In this state, the controller shall deallocate all media allocated for user data in the sanitization target.


title: nvme_sanitize_sstat(2)

summary: Sanitize Status (SSTAT)

text:
# nvme_sanitize_sstat(2)

## NAME
enum nvme_sanitize_sstat - Sanitize Status (SSTAT)

## SYNOPSIS
enum nvme_sanitize_sstat {

NVME_SANITIZE_SSTAT_STATUS_SHIFT ,

NVME_SANITIZE_SSTAT_STATUS_MASK ,

NVME_SANITIZE_SSTAT_STATUS_NEVER_SANITIZED ,

NVME_SANITIZE_SSTAT_STATUS_COMPLETE_SUCCESS ,

NVME_SANITIZE_SSTAT_STATUS_IN_PROGESS ,

NVME_SANITIZE_SSTAT_STATUS_COMPLETED_FAILED ,

NVME_SANITIZE_SSTAT_STATUS_ND_COMPLETE_SUCCESS ,

NVME_SANITIZE_SSTAT_COMPLETED_PASSES_SHIFT ,

NVME_SANITIZE_SSTAT_COMPLETED_PASSES_MASK ,

NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_SHIFT ,

NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_MASK ,

NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED ,

NVME_SANITIZE_SSTAT_MVCNCLD_SHIFT ,

NVME_SANITIZE_SSTAT_MVCNCLD_MASK

};

## Constants
NVME_SANITIZE_SSTAT_STATUS_SHIFT

Shift amount to get the status value of the most recent sanitize operation from the struct nvme_sanitize_log_page.sstat field.

NVME_SANITIZE_SSTAT_STATUS_MASK

Mask to get the status value of the most recent sanitize operation.

NVME_SANITIZE_SSTAT_STATUS_NEVER_SANITIZED

The NVM subsystem has never been sanitized.

NVME_SANITIZE_SSTAT_STATUS_COMPLETE_SUCCESS

The most recent sanitize operation completed successfully including any additional media modification.

NVME_SANITIZE_SSTAT_STATUS_IN_PROGESS

A sanitize operation is currently in progress.

NVME_SANITIZE_SSTAT_STATUS_COMPLETED_FAILED

The most recent sanitize operation failed.

NVME_SANITIZE_SSTAT_STATUS_ND_COMPLETE_SUCCESS

The most recent sanitize operation for which No-Deallocate After Sanitize was requested has completed successfully with deallocation of all user data.

NVME_SANITIZE_SSTAT_COMPLETED_PASSES_SHIFT

Shift amount to get the number of completed passes if the most recent sanitize operation was an Overwrite. This value shall be cleared to 0h if the most recent sanitize operation was not an Overwrite.

NVME_SANITIZE_SSTAT_COMPLETED_PASSES_MASK

Mask to get the number of completed passes.

NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_SHIFT

Shift amount to get the Global Data Erased value from the struct nvme_sanitize_log_page.sstat field.

NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_MASK

Mask to get the Global Data Erased value.

NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED

Global Data Erased: if set, then no namespace user data in the NVM subsystem has been written to and no Persistent Memory Region in the NVM subsystem has been enabled since being manufactured and the NVM subsystem has never been sanitized; or since the most recent successful sanitize operation.

NVME_SANITIZE_SSTAT_MVCNCLD_SHIFT

Shift amount to get the value of Media Verification Canceled bit of Sanitize status field.

NVME_SANITIZE_SSTAT_MVCNCLD_MASK

Mask to get the value of Media Verification Canceled bit of Sanitize status field.


title: nvme_sanitize_start_event(2)

summary: Sanitize Start Event Data

text:
# nvme_sanitize_start_event(2)

## NAME
struct nvme_sanitize_start_event - Sanitize Start Event Data

## SYNOPSIS
struct nvme_sanitize_start_event {

__le32 sani_cap;

__le32 sani_cdw10;

__le32 sani_cdw11;

};

## Members
sani_cap

SANICAP

sani_cdw10

Sanitize CDW10

sani_cdw11

Sanitize CDW11


title: nvme_scan(2)

summary: Scan NVMe topology

text:
# nvme_scan(2)

## NAME
nvme_scan - Scan NVMe topology

## SYNOPSIS
nvme_root_t nvme_scan (const char *config_file );

## ARGUMENTS
config_file

Configuration file

## RETURN
nvme_root_t object of found elements


title: nvme_scan_ctrl(2)

summary: Scan on a controller

text:
# nvme_scan_ctrl(2)

## NAME
nvme_scan_ctrl - Scan on a controller

## SYNOPSIS
nvme_ctrl_t nvme_scan_ctrl (nvme_root_t r , const char *name );

## ARGUMENTS
r

nvme_root_t object

name

Name of the controller

## DESCRIPTION
Scans a controller with sysfs name name and add it to r.

## RETURN
nvme_ctrl_t object


title: nvme_scan_ctrl_namespace_paths(2)

text:
# nvme_scan_ctrl_namespace_paths(2)

## NAME
nvme_scan_ctrl_namespace_paths - Scan for namespace paths in a controller

## SYNOPSIS
int nvme_scan_ctrl_namespace_paths (nvme_ctrl_t c , struct dirent ***paths );

## ARGUMENTS
c

Controller to scan

paths

Pointer to array of dirents

## RETURN
number of entries in paths


title: nvme_scan_ctrl_namespaces(2)

summary: Scan for namespaces in a controller

text:
# nvme_scan_ctrl_namespaces(2)

## NAME
nvme_scan_ctrl_namespaces - Scan for namespaces in a controller

## SYNOPSIS
int nvme_scan_ctrl_namespaces (nvme_ctrl_t c , struct dirent ***ns );

## ARGUMENTS
c

Controller to scan

ns

Pointer to array of dirents

## RETURN
number of entries in ns


title: nvme_scan_ctrls(2)

summary: Scan for controllers

text:
# nvme_scan_ctrls(2)

## NAME
nvme_scan_ctrls - Scan for controllers

## SYNOPSIS
int nvme_scan_ctrls (struct dirent ***ctrls );

## ARGUMENTS
ctrls

Pointer to array of dirents

## RETURN
number of entries in ctrls


title: nvme_scan_namespace(2)

summary: scan namespace based on sysfs name

text:
# nvme_scan_namespace(2)

## NAME
nvme_scan_namespace - scan namespace based on sysfs name

## SYNOPSIS
nvme_ns_t nvme_scan_namespace (const char *name );

## ARGUMENTS
name

sysfs name of the namespace to scan

## RETURN
nvme_ns_t object or NULL if not found.


title: nvme_scan_ns_head_paths(2)

summary: Scan for namespace paths

text:
# nvme_scan_ns_head_paths(2)

## NAME
nvme_scan_ns_head_paths - Scan for namespace paths

## SYNOPSIS
int nvme_scan_ns_head_paths (nvme_ns_head_t head , struct dirent ***paths );

## ARGUMENTS
head

Namespace head node to scan

paths

Pointer to array of dirents

## RETURN
number of entries in ents


title: nvme_scan_subsystem_namespaces(2)

summary: Scan for namespaces in a subsystem

text:
# nvme_scan_subsystem_namespaces(2)

## NAME
nvme_scan_subsystem_namespaces - Scan for namespaces in a subsystem

## SYNOPSIS
int nvme_scan_subsystem_namespaces (nvme_subsystem_t s , struct dirent ***ns );

## ARGUMENTS
s

Subsystem to scan

ns

Pointer to array of dirents

## RETURN
number of entries in ns


title: nvme_scan_subsystems(2)

summary: Scan for subsystems

text:
# nvme_scan_subsystems(2)

## NAME
nvme_scan_subsystems - Scan for subsystems

## SYNOPSIS
int nvme_scan_subsystems (struct dirent ***subsys );

## ARGUMENTS
subsys

Pointer to array of dirents

## RETURN
number of entries in subsys


title: nvme_scan_tls_keys(2)

summary: Iterate over TLS keys in a keyring

text:
# nvme_scan_tls_keys(2)

## NAME
nvme_scan_tls_keys - Iterate over TLS keys in a keyring

## SYNOPSIS
int nvme_scan_tls_keys (const char *keyring , nvme_scan_tls_keys_cb_t cb , void *data );

## ARGUMENTS
keyring

Keyring holding TLS keys

cb

Callback function

data

Pointer for data to be passed to cb

## DESCRIPTION
Iterates keyring and call cb for each TLS key. When keyring is NULL the default '.nvme' keyring is used. A TLS key must be of type 'psk' and the description must be of the form 'NVMe<0|1><R|G>0<1|2> <identity>', otherwise it will be skipped during iteration.

## RETURN
Number of keys for which cb was called, or -1 with errno set on error.


title: nvme_scan_topology(2)

summary: Scan NVMe topology and apply filter

text:
# nvme_scan_topology(2)

## NAME
nvme_scan_topology - Scan NVMe topology and apply filter

## SYNOPSIS
int nvme_scan_topology (nvme_root_t r , nvme_scan_filter_t f , void *f_args );

## ARGUMENTS
r

nvme_root_t object

f

filter to apply

f_args

user-specified argument to f

## DESCRIPTION
Scans the NVMe topology and filters out the resulting elements by applying f.

## RETURN
0 on success, -1 on failure with errno set.


title: nvme_secondary_ctrl(2)

summary: Secondary Controller Entry

text:
# nvme_secondary_ctrl(2)

## NAME
struct nvme_secondary_ctrl - Secondary Controller Entry

## SYNOPSIS
struct nvme_secondary_ctrl {

__le16 scid;

__le16 pcid;

__u8 scs;

__u8 rsvd5[3];

__le16 vfn;

__le16 nvq;

__le16 nvi;

__u8 rsvd14[18];

};

## Members
scid

Secondary Controller Identifier

pcid

Primary Controller Identifier

scs

Secondary Controller State

rsvd5

Reserved

vfn

Virtual Function Number

nvq

Number of VQ Flexible Resources Assigned

nvi

Number of VI Flexible Resources Assigned

rsvd14

Reserved


title: nvme_secondary_ctrl_list(2)

summary: Secondary Controller List

text:
# nvme_secondary_ctrl_list(2)

## NAME
struct nvme_secondary_ctrl_list - Secondary Controller List

## SYNOPSIS
struct nvme_secondary_ctrl_list {

__u8 num;

__u8 rsvd[31];

struct nvme_secondary_ctrl sc_entry[NVME_ID_SECONDARY_CTRL_MAX];

};

## Members
num

Number of Identifiers

rsvd

Reserved

sc_entry

Secondary Controller Entry


title: nvme_security_receive(2)

summary: Security Receive command

text:
# nvme_security_receive(2)

## NAME
nvme_security_receive - Security Receive command

## SYNOPSIS
int nvme_security_receive (struct nvme_security_receive_args *args );

## ARGUMENTS
args

struct nvme_security_receive argument structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_security_receive_args(2)

text:
# nvme_security_receive_args(2)

## NAME
struct nvme_security_receive_args - Arguments for the NVMe Security Receive command

## SYNOPSIS
struct nvme_security_receive_args {

__u32 *result;

void *data;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

__u32 al;

__u32 data_len;

__u8 nssf;

__u8 spsp0;

__u8 spsp1;

__u8 secp;

};

## Members
result

The command completion result from CQE dword0

data

Security data payload to send

args_size

Size of struct nvme_security_receive_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace ID to issue security command on

al

Protocol specific allocation length

data_len

Data length of the payload in bytes

nssf

NVMe Security Specific field

spsp0

Security Protocol Specific field

spsp1

Security Protocol Specific field

secp

Security Protocol


title: nvme_security_send(2)

summary: Security Send command

text:
# nvme_security_send(2)

## NAME
nvme_security_send - Security Send command

## SYNOPSIS
int nvme_security_send (struct nvme_security_send_args *args );

## ARGUMENTS
args

struct nvme_security_send argument structure

## DESCRIPTION
The Security Send command transfers security protocol data to the controller. The data structure transferred to the controller as part of this command contains security protocol specific commands to be performed by the controller. The data structure transferred may also contain data or parameters associated with the security protocol commands.

The security data is protocol specific and is not defined by the NVMe specification.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_security_send_args(2)

text:
# nvme_security_send_args(2)

## NAME
struct nvme_security_send_args - Arguments for the NVMe Security Send command

## SYNOPSIS
struct nvme_security_send_args {

__u32 *result;

void *data;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

__u32 tl;

__u32 data_len;

__u8 nssf;

__u8 spsp0;

__u8 spsp1;

__u8 secp;

};

## Members
result

The command completion result from CQE dword0

data

Security data payload to send

args_size

Size of struct nvme_security_send_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace ID to issue security command on

tl

Protocol specific transfer length

data_len

Data length of the payload in bytes

nssf

NVMe Security Specific field

spsp0

Security Protocol Specific field

spsp1

Security Protocol Specific field

secp

Security Protocol


title: nvme_self_test_log(2)

summary: Device Self-test (Log Identifier 06h)

text:
# nvme_self_test_log(2)

## NAME
struct nvme_self_test_log - Device Self-test (Log Identifier 06h)

## SYNOPSIS
struct nvme_self_test_log {

__u8 current_operation;

__u8 completion;

__u8 rsvd[2];

struct nvme_st_result result[NVME_LOG_ST_MAX_RESULTS];

};

## Members
current_operation

Current Device Self-Test Operation: indicates the status of the current device self-test operation. If a device self-test operation is in process (i.e., this field is set to #NVME_ST_CURR_OP_SHORT or #NVME_ST_CURR_OP_EXTENDED), then the controller shall not set this field to #NVME_ST_CURR_OP_NOT_RUNNING until a new Self-test Result Data Structure is created (i.e., if a device self-test operation completes or is aborted, then the controller shall create a Self-test Result Data Structure prior to setting this field to #NVME_ST_CURR_OP_NOT_RUNNING). See enum nvme_st_curr_op.

completion

Current Device Self-Test Completion: indicates the percentage of the device self-test operation that is complete (e.g., a value of 25 indicates that 25% of the device self-test operation is complete and 75% remains to be tested). If the current_operation field is cleared to #NVME_ST_CURR_OP_NOT_RUNNING (indicating there is no device self-test operation in progress), then this field is ignored.

rsvd

Reserved

result

Self-test Result Data Structures, see struct nvme_st_result.


title: nvme_set_etdas(2)

text:
# nvme_set_etdas(2)

## NAME
nvme_set_etdas - Set the Extended Telemetry Data Area 4 Supported bit

## SYNOPSIS
int nvme_set_etdas (int fd , bool *changed );

## ARGUMENTS
fd

File descriptor of nvme device

changed

boolean to indicate whether or not the host behavior support feature had been changed

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_feat_event_layout(2)

text:
# nvme_set_feat_event_layout(2)

## NAME
enum nvme_set_feat_event_layout - This field indicates the set feature event layout

## SYNOPSIS
enum nvme_set_feat_event_layout {

NVME_SET_FEAT_EVENT_DW_COUNT_SHIFT ,

NVME_SET_FEAT_EVENT_CC_DW0_SHIFT ,

NVME_SET_FEAT_EVENT_MB_COUNT_SHIFT ,

NVME_SET_FEAT_EVENT_DW_COUNT_MASK ,

NVME_SET_FEAT_EVENT_CC_DW0_MASK ,

NVME_SET_FEAT_EVENT_MB_COUNT_MASK

};

## Constants
NVME_SET_FEAT_EVENT_DW_COUNT_SHIFT

Shift amount to get the Dword count from the struct nvme_set_feature_event.layout field.

NVME_SET_FEAT_EVENT_CC_DW0_SHIFT

Shift amount to get the logged command completion Dword 0 from the struct nvme_set_feature_event.layout field.

NVME_SET_FEAT_EVENT_MB_COUNT_SHIFT

Shift amount to get the memory buffer count from the struct nvme_set_feature_event.layout field.

NVME_SET_FEAT_EVENT_DW_COUNT_MASK

Mask to get the Dword count from the struct nvme_set_feature_event.layout field.

NVME_SET_FEAT_EVENT_CC_DW0_MASK

Mask to get the logged command completion Dword 0 from the struct nvme_set_feature_event.layout field.

NVME_SET_FEAT_EVENT_MB_COUNT_MASK

Mask to get the memory buffer count from the struct nvme_set_feature_event.layout field.


title: nvme_set_feature_event(2)

summary: Set Feature Event Data

text:
# nvme_set_feature_event(2)

## NAME
struct nvme_set_feature_event - Set Feature Event Data

## SYNOPSIS
struct nvme_set_feature_event {

__le32 layout;

__le32 cdw_mem[0];

};

## Members
layout

Set Feature Event Layout

cdw_mem

Command Dwords Memory buffer


title: nvme_set_features(2)

summary: Set a feature attribute

text:
# nvme_set_features(2)

## NAME
nvme_set_features - Set a feature attribute

## SYNOPSIS
int nvme_set_features (struct nvme_set_features_args *args );

## ARGUMENTS
args

struct nvme_set_features_args argument structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_arbitration(2)

summary: Set arbitration features

text:
# nvme_set_features_arbitration(2)

## NAME
nvme_set_features_arbitration - Set arbitration features

## SYNOPSIS
int nvme_set_features_arbitration (int fd , __u8 ab , __u8 lpw , __u8 mpw , __u8 hpw , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

ab

Arbitration Burst

lpw

Low Priority Weight

mpw

Medium Priority Weight

hpw

High Priority Weight

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_args(2)

text:
# nvme_set_features_args(2)

## NAME
struct nvme_set_features_args - Arguments for the NVMe Admin Set Feature command

## SYNOPSIS
struct nvme_set_features_args {

__u32 *result;

void *data;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

__u32 cdw11;

__u32 cdw12;

__u32 cdw13;

__u32 cdw15;

__u32 data_len;

bool save;

__u8 uuidx;

__u8 fid;

};

## Members
result

The command completion result from CQE dword0

data

User address of feature data, if applicable

args_size

Size of struct nvme_set_features_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace ID, if applicable

cdw11

Value to set the feature to

cdw12

Feature specific command dword12 field

cdw13

Feature specific command dword13 field

cdw15

Feature specific command dword15 field

data_len

Length of feature data, if applicable, in bytes

save

Save value across power states

uuidx

UUID Index for differentiating vendor specific encoding

fid

Feature identifier


title: nvme_set_features_async_event(2)

summary: Set asynchronous event feature

text:
# nvme_set_features_async_event(2)

## NAME
nvme_set_features_async_event - Set asynchronous event feature

## SYNOPSIS
int nvme_set_features_async_event (int fd , __u32 events , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

events

Events to enable

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_auto_pst(2)

summary: Set autonomous power state feature

text:
# nvme_set_features_auto_pst(2)

## NAME
nvme_set_features_auto_pst - Set autonomous power state feature

## SYNOPSIS
int nvme_set_features_auto_pst (int fd , bool apste , bool save , struct nvme_feat_auto_pst *apst , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

apste

Autonomous Power State Transition Enable

save

Save value across power states

apst

Autonomous Power State Transition

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_data(2)

text:
# nvme_set_features_data(2)

## NAME
nvme_set_features_data - Helper function for @nvme_set_features()

## SYNOPSIS
int nvme_set_features_data (int fd , __u8 fid , __u32 nsid , __u32 cdw11 , bool save , __u32 data_len , void *data , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

fid

Feature identifier

nsid

Namespace ID, if applicable

cdw11

Value to set the feature to

save

Save value across power states

data_len

Length of feature data, if applicable, in bytes

data

User address of feature data, if applicable

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_endurance_evt_cfg(2)

summary: Set endurance event config feature

text:
# nvme_set_features_endurance_evt_cfg(2)

## NAME
nvme_set_features_endurance_evt_cfg - Set endurance event config feature

## SYNOPSIS
int nvme_set_features_endurance_evt_cfg (int fd , __u16 endgid , __u8 egwarn , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

endgid

Endurance Group Identifier

egwarn

Flags to enable warning, see enum nvme_eg_critical_warning_flags

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_err_recovery(2)

summary: Set error recovery feature

text:
# nvme_set_features_err_recovery(2)

## NAME
nvme_set_features_err_recovery - Set error recovery feature

## SYNOPSIS
int nvme_set_features_err_recovery (int fd , __u32 nsid , __u16 tler , bool dulbe , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID

tler

Time-limited error recovery value

dulbe

Deallocated or Unwritten Logical Block Error Enable

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_hctm(2)

summary: Set thermal management feature

text:
# nvme_set_features_hctm(2)

## NAME
nvme_set_features_hctm - Set thermal management feature

## SYNOPSIS
int nvme_set_features_hctm (int fd , __u16 tmt2 , __u16 tmt1 , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

tmt2

Thermal Management Temperature 2

tmt1

Thermal Management Temperature 1

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_host_behavior(2)

summary: Set host behavior feature

text:
# nvme_set_features_host_behavior(2)

## NAME
nvme_set_features_host_behavior - Set host behavior feature

## SYNOPSIS
int nvme_set_features_host_behavior (int fd , bool save , struct nvme_feat_host_behavior *data );

## ARGUMENTS
fd

File descriptor of nvme device

save

Save value across power states

data

Pointer to structure nvme_feat_host_behavior

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_host_id(2)

text:
# nvme_set_features_host_id(2)

## NAME
nvme_set_features_host_id - Set enable extended host identifiers feature

## SYNOPSIS
int nvme_set_features_host_id (int fd , bool exhid , bool save , __u8 *hostid );

## ARGUMENTS
fd

File descriptor of nvme device

exhid

Enable Extended Host Identifier

save

Save value across power states

hostid

Host ID to set

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_iocs_profile(2)

summary: Set I/O command set profile feature

text:
# nvme_set_features_iocs_profile(2)

## NAME
nvme_set_features_iocs_profile - Set I/O command set profile feature

## SYNOPSIS
int nvme_set_features_iocs_profile (int fd , __u16 iocsi , bool save );

## ARGUMENTS
fd

File descriptor of nvme device

iocsi

I/O Command Set Combination Index

save

Save value across power states

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_irq_coalesce(2)

summary: Set IRQ coalesce feature

text:
# nvme_set_features_irq_coalesce(2)

## NAME
nvme_set_features_irq_coalesce - Set IRQ coalesce feature

## SYNOPSIS
int nvme_set_features_irq_coalesce (int fd , __u8 thr , __u8 time , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

thr

Aggregation Threshold

time

Aggregation Time

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_irq_config(2)

summary: Set IRQ config feature

text:
# nvme_set_features_irq_config(2)

## NAME
nvme_set_features_irq_config - Set IRQ config feature

## SYNOPSIS
int nvme_set_features_irq_config (int fd , __u16 iv , bool cd , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

iv

Interrupt Vector

cd

Coalescing Disable

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_lba_range(2)

summary: Set LBA range feature

text:
# nvme_set_features_lba_range(2)

## NAME
nvme_set_features_lba_range - Set LBA range feature

## SYNOPSIS
int nvme_set_features_lba_range (int fd , __u32 nsid , __u8 nr_ranges , bool save , struct nvme_lba_range_type *data , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID

nr_ranges

Number of ranges in data

save

Save value across power states

data

User address of feature data

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_lba_sts_interval(2)

summary: Set LBA status information feature

text:
# nvme_set_features_lba_sts_interval(2)

## NAME
nvme_set_features_lba_sts_interval - Set LBA status information feature

## SYNOPSIS
int nvme_set_features_lba_sts_interval (int fd , __u16 lsiri , __u16 lsipi , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

lsiri

LBA Status Information Report Interval

lsipi

LBA Status Information Poll Interval

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_nopsc(2)

summary: Set non-operational power state feature

text:
# nvme_set_features_nopsc(2)

## NAME
nvme_set_features_nopsc - Set non-operational power state feature

## SYNOPSIS
int nvme_set_features_nopsc (int fd , bool noppme , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

noppme

Non-Operational Power State Permissive Mode Enable

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_plm_config(2)

summary: Set predictable latency feature

text:
# nvme_set_features_plm_config(2)

## NAME
nvme_set_features_plm_config - Set predictable latency feature

## SYNOPSIS
int nvme_set_features_plm_config (int fd , bool enable , __u16 nvmsetid , bool save , struct nvme_plm_config *data , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

enable

Predictable Latency Enable

nvmsetid

NVM Set Identifier

save

Save value across power states

data

Pointer to structure nvme_plm_config

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_plm_window(2)

summary: Set window select feature

text:
# nvme_set_features_plm_window(2)

## NAME
nvme_set_features_plm_window - Set window select feature

## SYNOPSIS
int nvme_set_features_plm_window (int fd , enum nvme_feat_plm_window_select sel , __u16 nvmsetid , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

sel

Window Select

nvmsetid

NVM Set Identifier

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_power_mgmt(2)

summary: Set power management feature

text:
# nvme_set_features_power_mgmt(2)

## NAME
nvme_set_features_power_mgmt - Set power management feature

## SYNOPSIS
int nvme_set_features_power_mgmt (int fd , __u8 ps , __u8 wh , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

ps

Power State

wh

Workload Hint

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_resv_mask(2)

text:
# nvme_set_features_resv_mask(2)

## NAME
nvme_set_features_resv_mask - Set reservation notification mask feature

## SYNOPSIS
int nvme_set_features_resv_mask (int fd , __u32 mask , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

mask

Reservation Notification Mask Field

save

Save value across power states

result

The command completion result from CQE dword0

## DESCRIPTION
Deprecated: doesn't support specifying a NSID. Use nvme_set_features_resv_mask2 instead.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_resv_mask2(2)

text:
# nvme_set_features_resv_mask2(2)

## NAME
nvme_set_features_resv_mask2 - Set reservation notification mask feature

## SYNOPSIS
int nvme_set_features_resv_mask2 (int fd , __u32 nsid , __u32 mask , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID

mask

Reservation Notification Mask Field

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_resv_persist(2)

summary: Set persist through power loss feature

text:
# nvme_set_features_resv_persist(2)

## NAME
nvme_set_features_resv_persist - Set persist through power loss feature

## SYNOPSIS
int nvme_set_features_resv_persist (int fd , bool ptpl , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

ptpl

Persist Through Power Loss

save

Save value across power states

result

The command completion result from CQE dword0

## DESCRIPTION
Deprecated: doesn't support specifying a NSID. Use nvme_set_features_resv_persist2 instead.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_resv_persist2(2)

summary: Set persist through power loss feature

text:
# nvme_set_features_resv_persist2(2)

## NAME
nvme_set_features_resv_persist2 - Set persist through power loss feature

## SYNOPSIS
int nvme_set_features_resv_persist2 (int fd , __u32 nsid , bool ptpl , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID

ptpl

Persist Through Power Loss

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_rrl(2)

summary: Set read recovery level feature

text:
# nvme_set_features_rrl(2)

## NAME
nvme_set_features_rrl - Set read recovery level feature

## SYNOPSIS
int nvme_set_features_rrl (int fd , __u8 rrl , __u16 nvmsetid , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

rrl

Read recovery level setting

nvmsetid

NVM set id

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_sanitize(2)

summary: Set sanitize feature

text:
# nvme_set_features_sanitize(2)

## NAME
nvme_set_features_sanitize - Set sanitize feature

## SYNOPSIS
int nvme_set_features_sanitize (int fd , bool nodrm , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

nodrm

No-Deallocate Response Mode

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_simple(2)

text:
# nvme_set_features_simple(2)

## NAME
nvme_set_features_simple - Helper function for @nvme_set_features()

## SYNOPSIS
int nvme_set_features_simple (int fd , __u8 fid , __u32 nsid , __u32 cdw11 , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

fid

Feature identifier

nsid

Namespace ID, if applicable

cdw11

Value to set the feature to

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_sw_progress(2)

text:
# nvme_set_features_sw_progress(2)

## NAME
nvme_set_features_sw_progress - Set pre-boot software load count feature

## SYNOPSIS
int nvme_set_features_sw_progress (int fd , __u8 pbslc , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

pbslc

Pre-boot Software Load Count

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_temp_thresh(2)

summary: Set temperature threshold feature

text:
# nvme_set_features_temp_thresh(2)

## NAME
nvme_set_features_temp_thresh - Set temperature threshold feature

## SYNOPSIS
int nvme_set_features_temp_thresh (int fd , __u16 tmpth , __u8 tmpsel , enum nvme_feat_tmpthresh_thsel thsel , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

tmpth

Temperature Threshold

tmpsel

Threshold Temperature Select

thsel

Threshold Type Select

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_temp_thresh2(2)

summary: Set temperature threshold feature

text:
# nvme_set_features_temp_thresh2(2)

## NAME
nvme_set_features_temp_thresh2 - Set temperature threshold feature

## SYNOPSIS
int nvme_set_features_temp_thresh2 (int fd , __u16 tmpth , __u8 tmpsel , enum nvme_feat_tmpthresh_thsel thsel , __u8 tmpthh , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

tmpth

Temperature Threshold

tmpsel

Threshold Temperature Select

thsel

Threshold Type Select

tmpthh

Temperature Threshold Hysteresis

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_timestamp(2)

summary: Set timestamp feature

text:
# nvme_set_features_timestamp(2)

## NAME
nvme_set_features_timestamp - Set timestamp feature

## SYNOPSIS
int nvme_set_features_timestamp (int fd , bool save , __u64 timestamp );

## ARGUMENTS
fd

File descriptor of nvme device

save

Save value across power states

timestamp

The current timestamp value to assign to this feature

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_volatile_wc(2)

summary: Set volatile write cache feature

text:
# nvme_set_features_volatile_wc(2)

## NAME
nvme_set_features_volatile_wc - Set volatile write cache feature

## SYNOPSIS
int nvme_set_features_volatile_wc (int fd , bool wce , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

wce

Write cache enable

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_write_atomic(2)

summary: Set write atomic feature

text:
# nvme_set_features_write_atomic(2)

## NAME
nvme_set_features_write_atomic - Set write atomic feature

## SYNOPSIS
int nvme_set_features_write_atomic (int fd , bool dn , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

dn

Disable Normal

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_write_protect(2)

summary: Set write protect feature

text:
# nvme_set_features_write_protect(2)

## NAME
nvme_set_features_write_protect - Set write protect feature

## SYNOPSIS
int nvme_set_features_write_protect (int fd , enum nvme_feat_nswpcfg_state state , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

state

Write Protection State

save

Save value across power states

result

The command completion result from CQE dword0

## DESCRIPTION
Deprecated: doesn't support specifying a NSID. Use nvme_set_features_write_protect2 instead.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_features_write_protect2(2)

summary: Set write protect feature

text:
# nvme_set_features_write_protect2(2)

## NAME
nvme_set_features_write_protect2 - Set write protect feature

## SYNOPSIS
int nvme_set_features_write_protect2 (int fd , __u32 nsid , enum nvme_feat_nswpcfg_state state , bool save , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID

state

Write Protection State

save

Save value across power states

result

The command completion result from CQE dword0

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_keyring(2)

summary: Link keyring for lookup

text:
# nvme_set_keyring(2)

## NAME
nvme_set_keyring - Link keyring for lookup

## SYNOPSIS
int nvme_set_keyring (long keyring_id );

## ARGUMENTS
keyring_id

Keyring id

## DESCRIPTION
Links keyring_id into the session keyring such that its keys are available for further key lookups.

## RETURN
0 on success, a negative number on error with errno set.


title: nvme_set_property(2)

summary: Set controller property

text:
# nvme_set_property(2)

## NAME
nvme_set_property - Set controller property

## SYNOPSIS
int nvme_set_property (struct nvme_set_property_args *args );

## ARGUMENTS
args

struct nvme_set_property_args argument structure

## DESCRIPTION
This is an NVMe-over-Fabrics specific command, not applicable to PCIe. These properties align to the PCI MMIO controller registers.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_set_property_args(2)

summary: Arguments for NVMe Set Property command

text:
# nvme_set_property_args(2)

## NAME
struct nvme_set_property_args - Arguments for NVMe Set Property command

## SYNOPSIS
struct nvme_set_property_args {

__u64 value;

__u32 *result;

int args_size;

int fd;

__u32 timeout;

int offset;

};

## Members
value

The value to set the property

result

The command completion result from CQE dword0

args_size

Size of struct nvme_set_property_args

fd

File descriptor of nvme device

timeout

Timeout in ms

offset

Property offset from the base to set


title: nvme_set_root(2)

summary: Set nvme_root_t context

text:
# nvme_set_root(2)

## NAME
nvme_set_root - Set nvme_root_t context

## SYNOPSIS
void nvme_set_root (nvme_root_t r );

## ARGUMENTS
r

nvme_root_t context

## DESCRIPTION
In order to be able to log from code paths where no root object is passed in via the arguments use the the default one which can be set via this call. When creating a new root object with nvme_create_root the global root object will be set as well. This means the global root object is always pointing to the latest created root object. Note the first nvme_free_tree call will reset the global root object.

This function is deprecated. Use nvme_init_default_logging or/and nvme_init_logging instead.


title: nvme_smart_crit(2)

summary: Critical Warning

text:
# nvme_smart_crit(2)

## NAME
enum nvme_smart_crit - Critical Warning

## SYNOPSIS
enum nvme_smart_crit {

NVME_SMART_CW_ASCBT_SHIFT ,

NVME_SMART_CW_TTC_SHIFT ,

NVME_SMART_CW_NDR_SHIFT ,

NVME_SMART_CW_AMRO_SHIFT ,

NVME_SMART_CW_VMBF_SHIFT ,

NVME_SMART_CW_PMRRO_SHIFT ,

NVME_SMART_CW_ASCBT_MASK ,

NVME_SMART_CW_TTC_MASK ,

NVME_SMART_CW_NDR_MASK ,

NVME_SMART_CW_AMRO_MASK ,

NVME_SMART_CW_VMBF_MASK ,

NVME_SMART_CW_PMRRO_MASK ,

NVME_SMART_CRIT_SPARE ,

NVME_SMART_CRIT_TEMPERATURE ,

NVME_SMART_CRIT_DEGRADED ,

NVME_SMART_CRIT_MEDIA ,

NVME_SMART_CRIT_VOLATILE_MEMORY ,

NVME_SMART_CRIT_PMR_RO

};

## Constants
NVME_SMART_CW_ASCBT_SHIFT

Shift amount to get the available spare capacity has fallen below the threshold.

NVME_SMART_CW_TTC_SHIFT

Shift amount to get the temperature is either greater than or equal to an over temperature threshold; or less than or equal to an under temperature threshold.

NVME_SMART_CW_NDR_SHIFT

Shift amount to get the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability.

NVME_SMART_CW_AMRO_SHIFT

Shift amount to get the all of the media has been placed in read only mode. The controller shall not set this bit if the read-only condition on the media is a result of a change in the write protection state of a namespace.

NVME_SMART_CW_VMBF_SHIFT

Shift amount to get the volatile memory backup device has failed. This field is only valid if the controller has a volatile memory backup solution.

NVME_SMART_CW_PMRRO_SHIFT

Shift amount to get the Persistent Memory Region has become read-only or unreliable.

NVME_SMART_CW_ASCBT_MASK

If set, then the available spare capacity has fallen below the threshold.

NVME_SMART_CW_TTC_MASK

Mask to get the temperature is either greater than or equal to an over temperature threshold; or less than or equal to an under temperature threshold.

NVME_SMART_CW_NDR_MASK

Mask to get the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability.

NVME_SMART_CW_AMRO_MASK

Mask to get the all of the media has been placed in read only mode. The controller shall not set this bit if the read-only condition on the media is a result of a change in the write protection state of a namespace.

NVME_SMART_CW_VMBF_MASK

Mask to get the volatile memory backup device has failed. This field is only valid if the controller has a volatile memory backup solution.

NVME_SMART_CW_PMRRO_MASK

Mask to get the Persistent Memory Region has become read-only or unreliable.

NVME_SMART_CRIT_SPARE

If set, then the available spare capacity has fallen below the threshold.

NVME_SMART_CRIT_TEMPERATURE

If set, then a temperature is either greater than or equal to an over temperature threshold; or less than or equal to an under temperature threshold.

NVME_SMART_CRIT_DEGRADED

If set, then the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability.

NVME_SMART_CRIT_MEDIA

If set, then all of the media has been placed in read only mode. The controller shall not set this bit if the read-only condition on the media is a result of a change in the write protection state of a namespace.

NVME_SMART_CRIT_VOLATILE_MEMORY

If set, then the volatile memory backup device has failed. This field is only valid if the controller has a volatile memory backup solution.

NVME_SMART_CRIT_PMR_RO

If set, then the Persistent Memory Region has become read-only or unreliable.


title: nvme_smart_egcw(2)

text:
# nvme_smart_egcw(2)

## NAME
enum nvme_smart_egcw - Endurance Group Critical Warning Summary

## SYNOPSIS
enum nvme_smart_egcw {

NVME_SMART_EGCW_SPARE ,

NVME_SMART_EGCW_DEGRADED ,

NVME_SMART_EGCW_RO

};

## Constants
NVME_SMART_EGCW_SPARE

If set, then the available spare capacity of one or more Endurance Groups has fallen below the threshold.

NVME_SMART_EGCW_DEGRADED

If set, then the reliability of one or more Endurance Groups has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability.

NVME_SMART_EGCW_RO

If set, then the namespaces in one or more Endurance Groups have been placed in read only mode not as a result of a change in the write protection state of a namespace.


title: nvme_smart_log(2)

text:
# nvme_smart_log(2)

## NAME
struct nvme_smart_log - SMART / Health Information Log (Log Identifier 02h)

## SYNOPSIS
struct nvme_smart_log {

__u8 critical_warning;

__u8 temperature[2];

__u8 avail_spare;

__u8 spare_thresh;

__u8 percent_used;

__u8 endu_grp_crit_warn_sumry;

__u8 rsvd7[25];

__u8 data_units_read[16];

__u8 data_units_written[16];

__u8 host_reads[16];

__u8 host_writes[16];

__u8 ctrl_busy_time[16];

__u8 power_cycles[16];

__u8 power_on_hours[16];

__u8 unsafe_shutdowns[16];

__u8 media_errors[16];

__u8 num_err_log_entries[16];

__le32 warning_temp_time;

__le32 critical_comp_time;

__le16 temp_sensor[8];

__le32 thm_temp1_trans_count;

__le32 thm_temp2_trans_count;

__le32 thm_temp1_total_time;

__le32 thm_temp2_total_time;

__u8 rsvd232[280];

};

## Members
critical_warning

This field indicates critical warnings for the state of the controller. Critical warnings may result in an asynchronous event notification to the host. Bits in this field represent the current associated state and are not persistent (see enum nvme_smart_crit).

temperature

Composite Temperature: Contains a value corresponding to a temperature in Kelvins that represents the current composite temperature of the controller and namespace(s) associated with that controller. The manner in which this value is computed is implementation specific and may not represent the actual temperature of any physical point in the NVM subsystem. Warning and critical overheating composite temperature threshold values are reported by the WCTEMP and CCTEMP fields in the Identify Controller data structure.

avail_spare

Available Spare: Contains a normalized percentage (0% to 100%) of the remaining spare capacity available.

spare_thresh

Available Spare Threshold: When the Available Spare falls below the threshold indicated in this field, an asynchronous event completion may occur. The value is indicated as a normalized percentage (0% to 100%). The values 101 to 255 are reserved.

percent_used

Percentage Used: Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer's prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).

endu_grp_crit_warn_sumry

Endurance Group Critical Warning Summary: This field indicates critical warnings for the state of Endurance Groups. Bits in this field represent the current associated state and are not persistent (see enum nvme_smart_egcw).

rsvd7

Reserved

data_units_read

Data Units Read: Contains the number of 512 byte data units the host has read from the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes read) and is rounded up (e.g., one indicates the that number of 512 byte data units read is from 1 to 1000, three indicates that the number of 512 byte data units read is from 2001 to 3000). When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data read to 512 byte units. For the NVM command set, logical blocks read as part of Compare, Read, and Verify operations shall be included in this value. A value of 0h in this field indicates that the number of Data Units Read is not reported.

data_units_written

Data Units Written: Contains the number of 512 byte data units the host has written to the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes written) and is rounded up (e.g., one indicates that the number of 512 byte data units written is from 1 to 1,000, three indicates that the number of 512 byte data units written is from 2001 to 3000). When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data written to 512 byte units. For the NVM command set, logical blocks written as part of Write operations shall be included in this value. Write Uncorrectable commands and Write Zeroes commands shall not impact this value. A value of 0h in this field indicates that the number of Data Units Written is not reported.

host_reads

Host Read Commands: Contains the number of read commands completed by the controller. For the NVM command set, this value is the sum of the number of Compare commands and the number of Read commands.

host_writes

Host Write Commands: Contains the number of write commands completed by the controller. For the NVM command set, this is the number of Write commands.

ctrl_busy_time

Controller Busy Time: Contains the amount of time the controller is busy with I/O commands. The controller is busy when there is a command outstanding to an I/O Queue (specifically, a command was issued via an I/O Submission Queue Tail doorbell write and the corresponding completion queue entry has not been posted yet to the associated I/O Completion Queue). This value is reported in minutes.

power_cycles

Power Cycles: Contains the number of power cycles.

power_on_hours

Power On Hours: Contains the number of power-on hours. This may not include time that the controller was powered and in a non-operational power state.

unsafe_shutdowns

Unsafe Shutdowns: Contains the number of unsafe shutdowns. This count is incremented when a Shutdown Notification (CC.SHN) is not received prior to loss of power.

media_errors

Media and Data Integrity Errors: Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field. Errors introduced as a result of a Write Uncorrectable command may or may not be included in this field.

num_err_log_entries

Number of Error Information Log Entries: Contains the number of Error Information log entries over the life of the controller.

warning_temp_time

Warning Composite Temperature Time: Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Warning Composite Temperature Threshold (WCTEMP) field and less than the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure. If the value of the WCTEMP or CCTEMP field is 0h, then this field is always cleared to 0h regardless of the Composite Temperature value.

critical_comp_time

Critical Composite Temperature Time: Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure. If the value of the CCTEMP field is 0h, then this field is always cleared to 0h regardless of the Composite Temperature value.

temp_sensor

Temperature Sensor 1-8: Contains the current temperature in degrees Kelvin reported by temperature sensors 1-8. The physical point in the NVM subsystem whose temperature is reported by the temperature sensor and the temperature accuracy is implementation specific. An implementation that does not implement the temperature sensor reports a value of 0h.

thm_temp1_trans_count

Thermal Management Temperature 1 Transition Count: Contains the number of times the controller transitioned to lower power active power states or performed vendor specific thermal management actions while minimizing the impact on performance in order to attempt to reduce the Composite Temperature because of the host controlled thermal management feature (i.e., the Composite Temperature rose above the Thermal Management Temperature 1). This counter shall not wrap once the value FFFFFFFFh is reached. A value of 0h, indicates that this transition has never occurred or this field is not implemented.

thm_temp2_trans_count

Thermal Management Temperature 2 Transition Count

thm_temp1_total_time

Total Time For Thermal Management Temperature 1: Contains the number of seconds that the controller had transitioned to lower power active power states or performed vendor specific thermal management actions while minimizing the impact on performance in order to attempt to reduce the Composite Temperature because of the host controlled thermal management feature. This counter shall not wrap once the value FFFFFFFFh is reached. A value of 0h, indicates that this transition has never occurred or this field is not implemented.

thm_temp2_total_time

Total Time For Thermal Management Temperature 2

rsvd232

Reserved


title: nvme_st_code(2)

summary: Self-test Code value

text:
# nvme_st_code(2)

## NAME
enum nvme_st_code - Self-test Code value

## SYNOPSIS
enum nvme_st_code {

NVME_ST_CODE_RESERVED ,

NVME_ST_CODE_SHORT ,

NVME_ST_CODE_EXTENDED ,

NVME_ST_CODE_HOST_INIT ,

NVME_ST_CODE_VS ,

NVME_ST_CODE_ABORT ,

NVME_ST_CODE_SHIFT

};

## Constants
NVME_ST_CODE_RESERVED

Reserved.

NVME_ST_CODE_SHORT

Short device self-test operation.

NVME_ST_CODE_EXTENDED

Extended device self-test operation.

NVME_ST_CODE_HOST_INIT

Host-Initiated Refresh operation.

NVME_ST_CODE_VS

Vendor specific.

NVME_ST_CODE_ABORT

Abort device self-test operation.

NVME_ST_CODE_SHIFT

Shift amount to get the code value from the struct nvme_st_result.dsts field.


title: nvme_st_curr_op(2)

summary: Current Device Self-Test Operation

text:
# nvme_st_curr_op(2)

## NAME
enum nvme_st_curr_op - Current Device Self-Test Operation

## SYNOPSIS
enum nvme_st_curr_op {

NVME_ST_CURR_OP_NOT_RUNNING ,

NVME_ST_CURR_OP_SHORT ,

NVME_ST_CURR_OP_EXTENDED ,

NVME_ST_CURR_OP_VS ,

NVME_ST_CURR_OP_RESERVED ,

NVME_ST_CURR_OP_MASK ,

NVME_ST_CURR_OP_CMPL_MASK

};

## Constants
NVME_ST_CURR_OP_NOT_RUNNING

No device self-test operation in progress.

NVME_ST_CURR_OP_SHORT

Short device self-test operation in progress.

NVME_ST_CURR_OP_EXTENDED

Extended device self-test operation in progress.

NVME_ST_CURR_OP_VS

Vendor specific.

NVME_ST_CURR_OP_RESERVED

Reserved.

NVME_ST_CURR_OP_MASK

Mask to get the current operation value from the struct nvme_self_test_log.current_operation field.

NVME_ST_CURR_OP_CMPL_MASK

Mask to get the current operation completion value from the struct nvme_self_test_log.completion field.


title: nvme_st_result(2)

summary: Self-test Result

text:
# nvme_st_result(2)

## NAME
struct nvme_st_result - Self-test Result

## SYNOPSIS
struct nvme_st_result {

__u8 dsts;

__u8 seg;

__u8 vdi;

__u8 rsvd;

__le64 poh;

__le32 nsid;

__le64 flba;

__u8 sct;

__u8 sc;

__u8 vs[2];

};

## Members
dsts

Device Self-test Status: Indicates the device self-test code and the status of the operation (see enum nvme_status_result and enum nvme_st_code).

seg

Segment Number: Iindicates the segment number where the first self-test failure occurred. If Device Self-test Status (dsts) is not set to #NVME_ST_RESULT_KNOWN_SEG_FAIL, then this field should be ignored.

vdi

Valid Diagnostic Information: Indicates the diagnostic failure information that is reported. See enum nvme_st_valid_diag_info.

rsvd

Reserved

poh

Power On Hours (POH): Indicates the number of power-on hours at the time the device self-test operation was completed or aborted. This does not include time that the controller was powered and in a low power state condition.

nsid

Namespace Identifier (NSID): Indicates the namespace that the Failing LBA occurred on. Valid only when the NSID Valid bit (#NVME_ST_VALID_DIAG_INFO_NSID) is set in the Valid Diagnostic Information (vdi) field.

flba

Failing LBA: indicates the 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. Valid only when the NSID Valid bit (#NVME_ST_VALID_DIAG_INFO_FLBA) is set in the Valid Diagnostic Information (vdi) field.

sct

Status Code Type: This field may contain additional information related to errors or conditions. Bits 2:0 may contain additional information relating to errors or conditions that occurred during the device self-test operation represented in the same format used in the Status Code Type field of the completion queue entry (refer to enum nvme_status_field). Valid only when the NSID Valid bit (#NVME_ST_VALID_DIAG_INFO_SCT) is set in the Valid Diagnostic Information (vdi) field.

sc

Status Code: This field may contain additional information relating to errors or conditions that occurred during the device self-test operation represented in the same format used in the Status Code field of the completion queue entry. Valid only when the SCT Valid bit (#NVME_ST_VALID_DIAG_INFO_SC) is set in the Valid Diagnostic Information (vdi) field.

vs

Vendor Specific.


title: nvme_st_valid_diag_info(2)

summary: Valid Diagnostic Information

text:
# nvme_st_valid_diag_info(2)

## NAME
enum nvme_st_valid_diag_info - Valid Diagnostic Information

## SYNOPSIS
enum nvme_st_valid_diag_info {

NVME_ST_VALID_DIAG_INFO_NSID ,

NVME_ST_VALID_DIAG_INFO_FLBA ,

NVME_ST_VALID_DIAG_INFO_SCT ,

NVME_ST_VALID_DIAG_INFO_SC

};

## Constants
NVME_ST_VALID_DIAG_INFO_NSID

NSID Valid: if set, then the contents of the Namespace Identifier field are valid.

NVME_ST_VALID_DIAG_INFO_FLBA

FLBA Valid: if set, then the contents of the Failing LBA field are valid.

NVME_ST_VALID_DIAG_INFO_SCT

SCT Valid: if set, then the contents of the Status Code Type field are valid.

NVME_ST_VALID_DIAG_INFO_SC

SC Valid: if set, then the contents of the Status Code field are valid.


title: nvme_status_code(2)

summary: Returns the NVMe Status Code

text:
# nvme_status_code(2)

## NAME
nvme_status_code - Returns the NVMe Status Code

## SYNOPSIS
__u16 nvme_status_code (__u16 status_field );

## ARGUMENTS
status_field

The NVMe Completion Queue Entry's Status Field See enum nvme_status_field

## RETURN
status code


title: nvme_status_code_type(2)

summary: Returns the NVMe Status Code Type

text:
# nvme_status_code_type(2)

## NAME
nvme_status_code_type - Returns the NVMe Status Code Type

## SYNOPSIS
__u16 nvme_status_code_type (__u16 status_field );

## ARGUMENTS
status_field

The NVMe Completion Queue Entry's Status Field See enum nvme_status_field

## RETURN
status code type


title: nvme_status_equals(2)

text:
# nvme_status_equals(2)

## NAME
nvme_status_equals - helper to check a status against a type and value

## SYNOPSIS
__u32 nvme_status_equals (int status , enum nvme_status_type type , unsigned int value );

## ARGUMENTS
status

the (non-negative) return value from the NVMe API

type

the status type

value

the status value

## RETURN
true if status is of the specified type and value