Skip to content

Commit 796dce5

Browse files
authored
Remove unused fields (#1149)
crucible#1087 split the `enum IOop` into different flavors for the upstairs versus downstairs. This PR removes unused fields from the latter.
1 parent 35ef0cf commit 796dce5

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

downstairs/src/lib.rs

+2-25
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,11 @@ enum IOop {
8686
extent: usize,
8787
flush_number: u64,
8888
gen_number: u64,
89-
source_downstairs: ClientId,
90-
repair_downstairs: Vec<ClientId>,
9189
},
9290
ExtentLiveRepair {
9391
dependencies: Vec<JobId>, // Jobs that must finish before this
9492
extent: usize,
95-
source_downstairs: ClientId,
9693
source_repair_address: SocketAddr,
97-
repair_downstairs: Vec<ClientId>,
9894
},
9995
ExtentLiveReopen {
10096
dependencies: Vec<JobId>, // Jobs that must finish before this
@@ -751,8 +747,6 @@ async fn proc_frame(
751747
extent: extent_id,
752748
flush_number,
753749
gen_number,
754-
source_downstairs: ClientId::new(0), // Unused in the downstairs
755-
repair_downstairs: vec![], // Unused in the downstairs
756750
};
757751

758752
let d = ad.lock().await;
@@ -765,8 +759,8 @@ async fn proc_frame(
765759
job_id,
766760
dependencies,
767761
extent_id,
768-
source_client_id,
769762
source_repair_address,
763+
..
770764
} => {
771765
if !is_message_valid(
772766
upstairs_connection,
@@ -784,9 +778,8 @@ async fn proc_frame(
784778
let new_repair = IOop::ExtentLiveRepair {
785779
dependencies,
786780
extent: extent_id,
787-
source_downstairs: source_client_id,
781+
788782
source_repair_address,
789-
repair_downstairs: vec![],
790783
};
791784

792785
let d = ad.lock().await;
@@ -2258,8 +2251,6 @@ impl Downstairs {
22582251
extent,
22592252
flush_number,
22602253
gen_number,
2261-
source_downstairs: _,
2262-
repair_downstairs: _,
22632254
} => {
22642255
let result = if !self.is_active(job.upstairs_connection) {
22652256
error!(self.log, "Upstairs inactive error");
@@ -2304,9 +2295,7 @@ impl Downstairs {
23042295
IOop::ExtentLiveRepair {
23052296
dependencies,
23062297
extent,
2307-
source_downstairs: _,
23082298
source_repair_address,
2309-
repair_downstairs: _,
23102299
} => {
23112300
debug!(
23122301
self.log,
@@ -3764,8 +3753,6 @@ mod test {
37643753
extent: 1,
37653754
flush_number: 1,
37663755
gen_number: 2,
3767-
source_downstairs: ClientId::new(0),
3768-
repair_downstairs: vec![ClientId::new(1)],
37693756
};
37703757
ds.add_work(upstairs_connection, JobId(1001), rio).await?;
37713758

@@ -3852,8 +3839,6 @@ mod test {
38523839
extent: 1,
38533840
flush_number: 1,
38543841
gen_number: gen,
3855-
source_downstairs: ClientId::new(0),
3856-
repair_downstairs: vec![ClientId::new(1)],
38573842
};
38583843
ds.add_work(upstairs_connection, JobId(1001), rio).await?;
38593844

@@ -4281,8 +4266,6 @@ mod test {
42814266
extent: eid as usize,
42824267
flush_number: 3,
42834268
gen_number: gen,
4284-
source_downstairs: ClientId::new(0),
4285-
repair_downstairs: vec![ClientId::new(1)],
42864269
};
42874270
ds.add_work(upstairs_connection, JobId(1001), rio).await?;
42884271

@@ -4409,8 +4392,6 @@ mod test {
44094392
extent: eid_one as usize,
44104393
flush_number: 6,
44114394
gen_number: gen,
4412-
source_downstairs: ClientId::new(0),
4413-
repair_downstairs: vec![ClientId::new(1)],
44144395
};
44154396
ds.add_work(upstairs_connection, JobId(1002), rio).await?;
44164397

@@ -4579,8 +4560,6 @@ mod test {
45794560
extent: eid,
45804561
flush_number: 1,
45814562
gen_number: 2,
4582-
source_downstairs: ClientId::new(0),
4583-
repair_downstairs: vec![ClientId::new(1)],
45844563
};
45854564
test_misc_work_through_work_queue(JobId(1000), ioop);
45864565
}
@@ -4596,9 +4575,7 @@ mod test {
45964575
let ioop = IOop::ExtentLiveRepair {
45974576
dependencies: vec![],
45984577
extent: eid,
4599-
source_downstairs: ClientId::new(0),
46004578
source_repair_address,
4601-
repair_downstairs: vec![ClientId::new(1)],
46024579
};
46034580
test_misc_work_through_work_queue(JobId(1000), ioop);
46044581
}

0 commit comments

Comments
 (0)