Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ExtentFlushClose::source_downstairs from upstairs IOop #1154

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions upstairs/src/downstairs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ impl Downstairs {
extent,
flush_number,
gen_number,
source_downstairs: _,
repair_downstairs,
} => {
cdt::ds__close__start!(|| (
Expand Down Expand Up @@ -1558,7 +1557,6 @@ impl Downstairs {
close_deps,
close_id,
gw_close_id,
source_downstairs,
repair_downstairs,
)
};
Expand Down Expand Up @@ -1743,22 +1741,19 @@ impl Downstairs {
ds_id
}

#[allow(clippy::too_many_arguments)]
fn create_close_io(
&mut self,
eid: usize,
ds_id: JobId,
dependencies: Vec<JobId>,
gw_id: GuestWorkId,
source: ClientId,
repair: Vec<ClientId>,
) -> DownstairsIO {
let close_ioop = IOop::ExtentFlushClose {
dependencies,
extent: eid,
flush_number: self.next_flush_id(),
gen_number: self.cfg.generation(),
source_downstairs: source,
repair_downstairs: repair,
};

Expand All @@ -1774,23 +1769,20 @@ impl Downstairs {
}
}

#[allow(clippy::too_many_arguments)]
fn create_and_enqueue_close_io(
&mut self,
gw: &mut GuestWork,
eid: u64,
deps: Vec<JobId>,
close_id: JobId,
gw_close_id: GuestWorkId,
source: ClientId,
repair: &[ClientId],
) {
let close_io = self.create_close_io(
eid as usize,
close_id,
deps,
gw_close_id,
source,
repair.to_vec(),
);

Expand Down Expand Up @@ -8146,15 +8138,13 @@ pub(crate) mod test {
// incorrect flush number
ds.next_flush = 0x1DE;
let next_flush = ds.next_flush;
let source = ClientId::new(1);
let repair = vec![ClientId::new(0), ClientId::new(2)];
ds.create_and_enqueue_close_io(
&mut gw,
eid,
deps,
repair_ids.close_id,
gw_close_id,
source,
&repair,
);

Expand All @@ -8167,7 +8157,6 @@ pub(crate) mod test {
extent,
flush_number,
gen_number,
source_downstairs,
repair_downstairs,
} => {
assert_eq!(
Expand All @@ -8177,7 +8166,6 @@ pub(crate) mod test {
assert_eq!(*extent, eid as usize);
assert_eq!(*flush_number, next_flush);
assert_eq!(*gen_number, ds.cfg.generation());
assert_eq!(*source_downstairs, source);
assert_eq!(*repair_downstairs, repair);
}
x => {
Expand Down Expand Up @@ -8383,7 +8371,6 @@ pub(crate) mod test {
deps,
extent_repair_ids.close_id,
gw_close_id,
ClientId::new(0), // source downstairs
&[ClientId::new(1)], // repair downstairs
);
let gw_repair_id = gw.next_gw_id();
Expand Down
2 changes: 0 additions & 2 deletions upstairs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,6 @@ enum IOop {
extent: usize,
flush_number: u64,
gen_number: u64,
source_downstairs: ClientId,
repair_downstairs: Vec<ClientId>,
},
ExtentLiveRepair {
Expand Down Expand Up @@ -1265,7 +1264,6 @@ impl IOop {
extent,
flush_number: _,
gen_number: _,
source_downstairs: _,
repair_downstairs: _,
} => {
let job_type = "FClose".to_string();
Expand Down
Loading