Skip to content

Conversation

@Lencerf
Copy link
Collaborator

@Lencerf Lencerf commented Jan 5, 2026

Introduce file locking for the virtio block device's disk image to prevent multiple processes or VMs from accessing the same disk image concurrently, which could lead to data corruption.

A shared lock is used for read-only access, and an exclusive lock for read-write access.

Introduce file locking for the virtio block device's disk image to
prevent multiple processes or VMs from accessing the same disk image
concurrently, which could lead to data corruption.

A shared lock is used for read-only access, and an exclusive lock for
read-write access.

Signed-off-by: Changyuan Lyu <[email protected]>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20725758292

Details

  • 0 of 7 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 26.491%

Changes Missing Coverage Covered Lines Changed/Added Lines %
alioth/src/virtio/dev/blk.rs 0 7 0.0%
Totals Coverage Status
Change from base Build 20683087458: -0.01%
Covered Lines: 3589
Relevant Lines: 14010

💛 - Coveralls

@Lencerf Lencerf merged commit 8f95f75 into google:main Jan 5, 2026
5 checks passed
@Lencerf Lencerf deleted the fix/blk-lock branch January 5, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants