@@ -610,7 +610,7 @@ impl Downstairs {
610
610
*/
611
611
for ( id, job) in & self . ds_active {
612
612
let state = & job. state [ client_id] ;
613
- if state == & IOState :: New || state == & IOState :: InProgress {
613
+ if state == & IOState :: InProgress {
614
614
info ! (
615
615
self . log,
616
616
"[{}] cannot deactivate, job {} in state {:?}" ,
@@ -2531,7 +2531,7 @@ impl Downstairs {
2531
2531
self . ds_active . for_each ( |ds_id, job| {
2532
2532
let state = & job. state [ client_id] ;
2533
2533
2534
- if matches ! ( state, IOState :: InProgress | IOState :: New ) {
2534
+ if matches ! ( state, IOState :: InProgress ) {
2535
2535
self . clients [ client_id] . skip_job ( job) ;
2536
2536
number_jobs_skipped += 1 ;
2537
2537
@@ -4262,7 +4262,7 @@ pub(crate) mod test {
4262
4262
upstairs:: UpstairsState ,
4263
4263
ClientId , CrucibleError , DownstairsIO , DsState , ExtentFix , IOState ,
4264
4264
IOop , ImpactedAddr , ImpactedBlocks , JobId , RawReadResponse ,
4265
- ReconcileIO , ReconciliationId , SnapshotDetails ,
4265
+ ReconcileIO , ReconcileIOState , ReconciliationId , SnapshotDetails ,
4266
4266
} ;
4267
4267
4268
4268
use bytes:: BytesMut ;
@@ -5877,9 +5877,9 @@ pub(crate) mod test {
5877
5877
panic ! ( "{:?} not ExtentFlush()" , m) ;
5878
5878
}
5879
5879
}
5880
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5881
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5882
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5880
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5881
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5882
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5883
5883
5884
5884
// Second task, close extent
5885
5885
let rio = ds. reconcile_task_list . pop_front ( ) . unwrap ( ) ;
@@ -5896,9 +5896,9 @@ pub(crate) mod test {
5896
5896
panic ! ( "{:?} not ExtentClose()" , m) ;
5897
5897
}
5898
5898
}
5899
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5900
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5901
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5899
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5900
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5901
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5902
5902
5903
5903
// Third task, repair extent
5904
5904
let rio = ds. reconcile_task_list . pop_front ( ) . unwrap ( ) ;
@@ -5924,9 +5924,9 @@ pub(crate) mod test {
5924
5924
panic ! ( "{:?} not ExtentRepair" , m) ;
5925
5925
}
5926
5926
}
5927
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5928
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5929
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5927
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5928
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5929
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5930
5930
5931
5931
// Third task, close extent
5932
5932
let rio = ds. reconcile_task_list . pop_front ( ) . unwrap ( ) ;
@@ -5943,9 +5943,9 @@ pub(crate) mod test {
5943
5943
panic ! ( "{:?} not ExtentClose()" , m) ;
5944
5944
}
5945
5945
}
5946
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5947
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5948
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5946
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
5947
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
5948
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5949
5949
}
5950
5950
5951
5951
#[ test]
@@ -5996,9 +5996,9 @@ pub(crate) mod test {
5996
5996
panic ! ( "{:?} not ExtentFlush()" , m) ;
5997
5997
}
5998
5998
}
5999
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6000
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6001
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
5999
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6000
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6001
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
6002
6002
6003
6003
// Second task, close extent
6004
6004
let rio = ds. reconcile_task_list . pop_front ( ) . unwrap ( ) ;
@@ -6015,9 +6015,9 @@ pub(crate) mod test {
6015
6015
panic ! ( "{:?} not ExtentClose()" , m) ;
6016
6016
}
6017
6017
}
6018
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6019
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6020
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
6018
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6019
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6020
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
6021
6021
6022
6022
// Third task, repair extent
6023
6023
let rio = ds. reconcile_task_list . pop_front ( ) . unwrap ( ) ;
@@ -6043,9 +6043,9 @@ pub(crate) mod test {
6043
6043
panic ! ( "{:?} not ExtentRepair" , m) ;
6044
6044
}
6045
6045
}
6046
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6047
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6048
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
6046
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6047
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6048
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
6049
6049
6050
6050
// Third task, close extent
6051
6051
let rio = ds. reconcile_task_list . pop_front ( ) . unwrap ( ) ;
@@ -6062,9 +6062,9 @@ pub(crate) mod test {
6062
6062
panic ! ( "{:?} not ExtentClose()" , m) ;
6063
6063
}
6064
6064
}
6065
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6066
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6067
- assert_eq ! ( IOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
6065
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 0 ) ] ) ;
6066
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 1 ) ] ) ;
6067
+ assert_eq ! ( ReconcileIOState :: New , rio. state[ ClientId :: new( 2 ) ] ) ;
6068
6068
}
6069
6069
6070
6070
// Tests for reconciliation
@@ -6333,9 +6333,9 @@ pub(crate) mod test {
6333
6333
let Some ( job) = & ds. reconcile_current_work else {
6334
6334
panic ! ( "failed to find current work" ) ;
6335
6335
} ;
6336
- assert_eq ! ( job. state[ ClientId :: new( 0 ) ] , IOState :: Skipped ) ;
6337
- assert_eq ! ( job. state[ ClientId :: new( 1 ) ] , IOState :: InProgress ) ;
6338
- assert_eq ! ( job. state[ ClientId :: new( 2 ) ] , IOState :: InProgress ) ;
6336
+ assert_eq ! ( job. state[ ClientId :: new( 0 ) ] , ReconcileIOState :: Skipped ) ;
6337
+ assert_eq ! ( job. state[ ClientId :: new( 1 ) ] , ReconcileIOState :: InProgress ) ;
6338
+ assert_eq ! ( job. state[ ClientId :: new( 2 ) ] , ReconcileIOState :: InProgress ) ;
6339
6339
6340
6340
let msg = Message :: RepairAckId { repair_id : rep_id } ;
6341
6341
assert ! ( !ds. on_reconciliation_ack(
0 commit comments