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,
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,