Skip to content

Commit ab7cd43

Browse files
tbzatekigaw
authored andcommitted
nbft: Add SSNS 'discovered' flag
Indicates that the SSNS record was obtained through discovery. Signed-off-by: Tomas Bzatek <[email protected]>
1 parent 52a9d83 commit ab7cd43

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/nvme/nbft.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ static int read_ssns(struct nbft_info *nbft,
249249
/* flags */
250250
ssns->unavailable = !!(le16_to_cpu(raw_ssns->flags) &
251251
NBFT_SSNS_UNAVAIL_NAMESPACE_UNAVAIL);
252+
ssns->discovered = !!(le16_to_cpu(raw_ssns->flags) &
253+
NBFT_SSNS_DISCOVERED_NAMESPACE);
252254

253255
/* security profile */
254256
if (raw_ssns->security_desc_index) {

src/nvme/nbft.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,8 @@ enum nbft_info_nid_type {
11801180
* Descriptor) or 0 if not supported.
11811181
* @dhcp_root_path_string: DHCP Root Path Override string (SSNS Extended
11821182
* Information Descriptor).
1183+
* @discovered: Indicates that this namespace was acquired
1184+
* through discovery.
11831185
* @unavailable: Namespace is unavailable as indicated by
11841186
* the pre-OS driver.
11851187
*/
@@ -1202,6 +1204,7 @@ struct nbft_info_subsystem_ns {
12021204
int controller_id;
12031205
int asqsz;
12041206
char *dhcp_root_path_string;
1207+
bool discovered;
12051208
bool unavailable;
12061209
};
12071210

0 commit comments

Comments
 (0)