@@ -1495,6 +1495,50 @@ impl RequestHandler for AdminIdentifyRequest {
14951495 }
14961496 }
14971497 }
1498+ AdminIdentifyCnsRequestType :: NamespaceAttachedControllerList => {
1499+ match match NamespaceId ( self . nsid ) . disposition ( subsys) {
1500+ NamespaceIdDisposition :: Invalid => ControllerListResponse :: new ( )
1501+ . encode ( )
1502+ . map_err ( AdminIoCqeGenericCommandStatus :: from) ,
1503+ NamespaceIdDisposition :: Broadcast => {
1504+ Err ( AdminIoCqeGenericCommandStatus :: InvalidFieldInCommand )
1505+ }
1506+ NamespaceIdDisposition :: Unallocated | NamespaceIdDisposition :: Inactive ( _) => {
1507+ ControllerListResponse :: new ( )
1508+ . encode ( )
1509+ . map_err ( AdminIoCqeGenericCommandStatus :: from)
1510+ }
1511+ NamespaceIdDisposition :: Active ( ns) => {
1512+ let mut clr = ControllerListResponse :: new ( ) ;
1513+ for cid in subsys. ctlrs . iter ( ) . filter_map ( |c| {
1514+ if c. id . 0 >= self . cntid && c. active_ns . contains ( & ns. id ) {
1515+ Some ( c. id )
1516+ } else {
1517+ None
1518+ }
1519+ } ) {
1520+ if let Err ( id) = clr. ids . push ( cid. 0 ) {
1521+ debug ! ( "Failed to push controller ID {id}" ) ;
1522+ return Err ( ResponseStatus :: InternalError ) ;
1523+ }
1524+ }
1525+ clr. update ( ) ?;
1526+ clr. encode ( ) . map_err ( AdminIoCqeGenericCommandStatus :: from)
1527+ }
1528+ } {
1529+ Ok ( response) => {
1530+ admin_send_response_body (
1531+ resp,
1532+ admin_constrain_body ( self . dofst , self . dlen , & response. 0 ) ?,
1533+ )
1534+ . await
1535+ }
1536+ Err ( status) => {
1537+ admin_send_status ( resp, AdminIoCqeStatusType :: GenericCommandStatus ( status) )
1538+ . await
1539+ }
1540+ }
1541+ }
14981542 AdminIdentifyCnsRequestType :: NvmSubsystemControllerList => {
14991543 assert ! (
15001544 subsys. ctlrs. len( ) <= 2047 ,
0 commit comments