File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
src/bindings/rust/src/descriptors Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -183,9 +183,14 @@ impl<'a> RegDescList<'a> {
183183 }
184184
185185 /// Resizes the list to the given size
186- pub fn resize ( & mut self , _new_size : usize ) -> Result < ( ) , NixlError > {
187- self . sync_mgr . mutate ( |_data| {
188- // No-op for now; backend capacity will be adjusted on next sync
186+ pub fn resize ( & mut self , new_size : usize ) -> Result < ( ) , NixlError > {
187+ self . sync_mgr . mutate ( |data| {
188+ data. descriptors . resize ( new_size, RegDescriptor {
189+ addr : 0 ,
190+ len : 0 ,
191+ dev_id : 0 ,
192+ metadata : Vec :: new ( ) ,
193+ } ) ;
189194 } ) ;
190195 Ok ( ( ) )
191196 }
Original file line number Diff line number Diff line change @@ -161,9 +161,13 @@ impl<'a> XferDescList<'a> {
161161 }
162162
163163 /// Resizes the list to the given size
164- pub fn resize ( & mut self , _new_size : usize ) -> Result < ( ) , NixlError > {
165- self . sync_mgr . mutate ( |_data| {
166- // No-op for now; backend capacity will be adjusted on next sync
164+ pub fn resize ( & mut self , new_size : usize ) -> Result < ( ) , NixlError > {
165+ self . sync_mgr . mutate ( |data| {
166+ data. descriptors . resize ( new_size, XferDescriptor {
167+ addr : 0 ,
168+ len : 0 ,
169+ dev_id : 0 ,
170+ } ) ;
167171 } ) ;
168172 Ok ( ( ) )
169173 }
You can’t perform that action at this time.
0 commit comments