Skip to content

Commit

Permalink
Remove GuestWorkId (2/2) (#1482)
Browse files Browse the repository at this point in the history
(staged on top of #1481)

`GuestWorkId` is always 1:1 with `JobId`, so let's get rid of it!

It's not exposed to the guest or used by anything outside of Crucible
internals.

The only exception is DTrace probes, which now use the `JobId`
everywhere (instead of a mix of `JobId` and `GuestWorkId`). The
`gw__*__start` probes now fire immediately after a `JobId` is assigned,
rather than when the `GuestWorkId` was assigned.
  • Loading branch information
mkeeter authored Oct 2, 2024
1 parent 9f806c7 commit 29695ad
Show file tree
Hide file tree
Showing 5 changed files with 260 additions and 559 deletions.
13 changes: 5 additions & 8 deletions upstairs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1376,13 +1376,12 @@ impl DownstairsClient {
"[{}] read hash mismatch on id {}\n\
Expected {:x?}\n\
Computed {:x?}\n\
guest_id:{} start eid:{:?} start offset:{:?}\n\
start eid:{:?} start offset:{:?}\n\
job state:{:?}",
self.client_id,
ds_id,
job.read_validations,
read_validations,
job.guest_id,
start_eid,
start_offset,
job.state,
Expand Down Expand Up @@ -1433,7 +1432,7 @@ impl DownstairsClient {
assert!(!job.acked);
ackable = true;
debug!(self.log, "Read AckReady {}", ds_id.0);
cdt::up__to__ds__read__done!(|| job.guest_id.0);
cdt::up__to__ds__read__done!(|| ds_id.0);
} else {
/*
* If another job has finished already, we can
Expand Down Expand Up @@ -1465,7 +1464,7 @@ impl DownstairsClient {
assert!(extent_info.is_none());
if jobs_completed_ok == 2 {
ackable = true;
cdt::up__to__ds__write__done!(|| job.guest_id.0);
cdt::up__to__ds__write__done!(|| ds_id.0);
}
}
IOop::WriteUnwritten { .. } => {
Expand All @@ -1474,9 +1473,7 @@ impl DownstairsClient {
assert!(extent_info.is_none());
if jobs_completed_ok == 2 {
ackable = true;
cdt::up__to__ds__write__unwritten__done!(|| job
.guest_id
.0);
cdt::up__to__ds__write__unwritten__done!(|| ds_id.0);
}
}
IOop::Flush {
Expand All @@ -1502,7 +1499,7 @@ impl DownstairsClient {

if jobs_completed_ok == ack_at_num_jobs {
ackable = true;
cdt::up__to__ds__flush__done!(|| job.guest_id.0);
cdt::up__to__ds__flush__done!(|| ds_id.0);
if deactivate {
debug!(self.log, "deactivate flush {ds_id} done");
}
Expand Down
Loading

0 comments on commit 29695ad

Please sign in to comment.