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

DeadPage Reference Counter Test Case #178

Merged
merged 9 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion script
Submodule script updated 2 files
+52 −1 batt.py
+5 −0 conan-targets.mk
3 changes: 3 additions & 0 deletions src/llfs/ioring_page_file_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ void IoRingPageFileDevice::read_some(PageId page_id, i64 page_offset_in_file,
void IoRingPageFileDevice::drop(PageId id, WriteHandler&& handler)
{
// TODO [tastolfi 2021-06-11] - trim at device level?
// Note that we are not clearing the data blocks here. This behavior is copied replicated for
// SimulatedPageDevice drop() too. Thus, when modifying this function do visit
// SimulatedPageDevice::Impl::drop() and make sure things are updated there.
(void)id;
handler(OkStatus());
}
Expand Down
5 changes: 3 additions & 2 deletions src/llfs/simulated_page_device_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,10 @@ void SimulatedPageDevice::Impl::drop(u32 device_create_step, PageId page_id,
return;
}

// No failure injected; erase the DataBlock at the given index and notify the op.
// No failure injected.
// Note that we are not not erasing the data block as we want to mimic the actual
// io_ring Page Device behavior.
//
locked_blocks->erase(block_i);
op->set_block_result(block_i - block_0, batt::OkStatus());
});
});
Expand Down
Loading