[OpenSM] patches for saquery porting - 3 of 6: