block/file: be more defensive about the backing file
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- operating-systems
Research direction
Start in lib/propolis/src/block/file.rs around line 175 and read how the backing file is opened, then check Rust's Unix OpenOptionsExt::custom_flags documentation. Add the requested exclusive-opening behavior and verify that concurrent writable opens are rejected while the intended read-only behavior remains clear.
Written by the indexing model from the issue text.
Description
in file.rs we'll just open the backing file for whatever permissions the disk should have: https://github.com/oxidecomputer/propolis/blob/2dc643742f82d2e072a1281dab23ba2bfdcee440/lib/propolis/src/block/file.rs#L175
but we don't get O_EXCL in here anywhere. I'd thought offhandedly that we could take advantage of that for a very weird one-off test configuration (opening a volume from multiple propolises concurrently), but this was appropriately worrying to everyone else with more calibrated fear-o-meter. we should probably open with O_EXCL, which I think we can plumb in with custom_flags()
if Propolis is told to open a file for writing by multiple VMs concurrently that's likely a serious operator error. I'm less opposed to concurrent read-only opens, but caution seems more appropriate here. I've definitely corrupted guests doing this nonsense locally before.
- Dominant language
- Rust
- Stars
- 270
- Forks
- 42
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from oxidecomputer/propolis
-
development
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxidecomputer/propolis#1157 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
oxidecomputer/propolis#1219 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
oxidecomputer/propolis#1214 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
oxidecomputer/propolis#1213 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
oxidecomputer/propolis#1207 · 2 comments ·
All issues in oxidecomputer/propolis
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100