File tree 2 files changed +4
-11
lines changed
2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -1016,11 +1016,7 @@ impl Downstairs {
1016
1016
///
1017
1017
/// This function is idempotent; it returns without doing anything if
1018
1018
/// live-repair either can't be started or is already running.
1019
- pub ( crate ) fn check_live_repair_start (
1020
- & mut self ,
1021
- up_state : & UpstairsState ,
1022
- extent_count : u32 ,
1023
- ) {
1019
+ pub ( crate ) fn check_live_repair_start ( & mut self , up_state : & UpstairsState ) {
1024
1020
// If we're already doing live-repair, then we can't start live-repair
1025
1021
if self . live_repair_in_progress ( ) {
1026
1022
return ;
@@ -1067,7 +1063,7 @@ impl Downstairs {
1067
1063
// Submit the initial repair jobs, which kicks everything off
1068
1064
self . begin_repair_for (
1069
1065
ExtentId ( 0 ) ,
1070
- Some ( extent_count) ,
1066
+ Some ( self . ddef . unwrap ( ) . extent_count ( ) ) ,
1071
1067
false ,
1072
1068
& repair_downstairs,
1073
1069
source_downstairs,
@@ -9760,7 +9756,7 @@ pub(crate) mod test {
9760
9756
9761
9757
// Start the repair normally. This enqueues the close & reopen jobs, and
9762
9758
// reserves Job IDs for the repair/noop
9763
- ds. check_live_repair_start ( & UpstairsState :: Active , 3 ) ;
9759
+ ds. check_live_repair_start ( & UpstairsState :: Active ) ;
9764
9760
assert ! ( ds. live_repair_in_progress( ) ) ;
9765
9761
9766
9762
// Submit a write.
Original file line number Diff line number Diff line change @@ -918,10 +918,7 @@ impl Upstairs {
918
918
}
919
919
920
920
// Try to start live-repair
921
- self . downstairs . check_live_repair_start (
922
- & self . state ,
923
- self . ddef . get_def ( ) . unwrap ( ) . extent_count ( ) ,
924
- ) ;
921
+ self . downstairs . check_live_repair_start ( & self . state ) ;
925
922
}
926
923
927
924
/// Returns `true` if we're ready to accept guest IO
You can’t perform that action at this time.
0 commit comments