Skip to content

Commit

Permalink
nbft: Add SSNS 'discovered' flag
Browse files Browse the repository at this point in the history
Indicates that the SSNS record was obtained through discovery.

Signed-off-by: Tomas Bzatek <[email protected]>
  • Loading branch information
tbzatek committed Feb 19, 2024
1 parent d25b0e8 commit e6f780b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nvme/nbft.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ static int read_ssns(struct nbft_info *nbft,
/* flags */
ssns->unavailable = !!(le16_to_cpu(raw_ssns->flags) &
NBFT_SSNS_UNAVAIL_NAMESPACE_UNAVAIL);
ssns->discovered = !!(le16_to_cpu(raw_ssns->flags) &
(NBFT_SSNS_DISCOVERED_NAMESPACE |
NBFT_SSNS_SEPARATE_DISCOVERY_CTRL));

/* security profile */
if (raw_ssns->security_desc_index) {
Expand Down
3 changes: 3 additions & 0 deletions src/nvme/nbft.h
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,8 @@ enum nbft_info_nid_type {
* Descriptor) or 0 if not supported.
* @dhcp_root_path_string: DHCP Root Path Override string (SSNS Extended
* Information Descriptor).
* @discovered: Indicates that this namespace was acquired
* through discovery.
* @unavailable: Namespace is unavailable as indicated by
* the pre-OS driver.
*/
Expand All @@ -1202,6 +1204,7 @@ struct nbft_info_subsystem_ns {
int controller_id;
int asqsz;
char *dhcp_root_path_string;
bool discovered;
bool unavailable;
};

Expand Down

0 comments on commit e6f780b

Please sign in to comment.