Skip to content

Mounting block devices as virtio devices doesn't work correctly #1316

@kzys

Description

@kzys

While investigating firecracker-microvm/firecracker-containerd#253, we have found a small gap regarding virtio block device support on Firecracker.

Currently Firecracker is using std::fs::metadata() to check the size of a virtio block device, which ultimately calls stat() on Unix.

However firecracker-containerd is using a loopback device as the backing file for a virtio block device. On a lookback device, the size from stat() is always zero.

Can Firecracker support our usecase by inspecting the size of the file more deeply? You probably can use BLKGETSIZE64 ioctl.

Thanks,

Metadata

Metadata

Assignees

Labels

Priority: HighIndicates than an issue or pull request should be resolved ahead of issues or pull requests labelledType: BugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions