-
Notifications
You must be signed in to change notification settings - Fork 31
Description
in file.rs we'll just open the backing file for whatever permissions the disk should have:
propolis/lib/propolis/src/block/file.rs
Line 175 in 2dc6437
| let fp = OpenOptions::new().read(true).write(!read_only).open(p)?; |
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.