Skip to content

Commit 51ce77e

Browse files
committed
Remove unnecessary argument
1 parent 3571dae commit 51ce77e

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

upstairs/src/downstairs.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -1016,11 +1016,7 @@ impl Downstairs {
10161016
///
10171017
/// This function is idempotent; it returns without doing anything if
10181018
/// 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) {
10241020
// If we're already doing live-repair, then we can't start live-repair
10251021
if self.live_repair_in_progress() {
10261022
return;
@@ -1067,7 +1063,7 @@ impl Downstairs {
10671063
// Submit the initial repair jobs, which kicks everything off
10681064
self.begin_repair_for(
10691065
ExtentId(0),
1070-
Some(extent_count),
1066+
Some(self.ddef.unwrap().extent_count()),
10711067
false,
10721068
&repair_downstairs,
10731069
source_downstairs,
@@ -9760,7 +9756,7 @@ pub(crate) mod test {
97609756

97619757
// Start the repair normally. This enqueues the close & reopen jobs, and
97629758
// reserves Job IDs for the repair/noop
9763-
ds.check_live_repair_start(&UpstairsState::Active, 3);
9759+
ds.check_live_repair_start(&UpstairsState::Active);
97649760
assert!(ds.live_repair_in_progress());
97659761

97669762
// Submit a write.

upstairs/src/upstairs.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -918,10 +918,7 @@ impl Upstairs {
918918
}
919919

920920
// 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);
925922
}
926923

927924
/// Returns `true` if we're ready to accept guest IO

0 commit comments

Comments
 (0)