@@ -1261,23 +1261,7 @@ impl RequestHandler for AdminIdentifyRequest {
12611261 Ok ( AdminIdentifyNvmIdentifyNamespaceResponse :: default ( ) )
12621262 }
12631263 // 4.1.5.1 NVM Command Set Spec, v1.0c
1264- NamespaceIdDisposition :: Active ( ns) => {
1265- Ok ( AdminIdentifyNvmIdentifyNamespaceResponse {
1266- nsze : ns. size ,
1267- ncap : ns. capacity ,
1268- nuse : ns. used ,
1269- nsfeat : ( ( ns. size == ns. capacity ) as u8 ) ,
1270- nlbaf : 0 ,
1271- flbas : 0 ,
1272- mc : 0 ,
1273- dpc : 0 ,
1274- dps : 0 ,
1275- nvmcap : 2_u128 . pow ( ns. block_order as u32 ) * ns. size as u128 ,
1276- lbaf0 : 0 ,
1277- lbaf0_lbads : ns. block_order ,
1278- lbaf0_rp : 0 ,
1279- } )
1280- }
1264+ NamespaceIdDisposition :: Active ( ns) => Ok ( ns. into ( ) ) ,
12811265 } ?
12821266 . encode ( ) ?;
12831267
@@ -1480,6 +1464,37 @@ impl RequestHandler for AdminIdentifyRequest {
14801464 )
14811465 . await
14821466 }
1467+ AdminIdentifyCnsRequestType :: IdentifyNamespaceForAllocatedNamespaceId => {
1468+ // Base v2.1, 5.1.13.2.10
1469+ match match NamespaceId ( self . nsid ) . disposition ( subsys) {
1470+ NamespaceIdDisposition :: Invalid | NamespaceIdDisposition :: Broadcast => {
1471+ Err ( AdminIoCqeGenericCommandStatus :: InvalidNamespaceOrFormat )
1472+ }
1473+ NamespaceIdDisposition :: Unallocated => {
1474+ AdminIdentifyNvmIdentifyNamespaceResponse :: default ( )
1475+ . encode ( )
1476+ . map_err ( AdminIoCqeGenericCommandStatus :: from)
1477+ }
1478+ NamespaceIdDisposition :: Inactive ( ns) | NamespaceIdDisposition :: Active ( ns) => {
1479+ let ainvminr: AdminIdentifyNvmIdentifyNamespaceResponse = ns. into ( ) ;
1480+ ainvminr
1481+ . encode ( )
1482+ . map_err ( AdminIoCqeGenericCommandStatus :: from)
1483+ }
1484+ } {
1485+ Ok ( response) => {
1486+ admin_send_response_body (
1487+ resp,
1488+ admin_constrain_body ( self . dofst , self . dlen , & response. 0 ) ?,
1489+ )
1490+ . await
1491+ }
1492+ Err ( err) => {
1493+ admin_send_status ( resp, AdminIoCqeStatusType :: GenericCommandStatus ( err) )
1494+ . await
1495+ }
1496+ }
1497+ }
14831498 AdminIdentifyCnsRequestType :: NvmSubsystemControllerList => {
14841499 assert ! (
14851500 subsys. ctlrs. len( ) <= 2047 ,
0 commit comments