You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sector size in mirage-block-xen is at least 4096 bytes no matter what the backing block device may report. I think there could be issues if the backing block device is actually 512 bytes although that should be rare today I guess.
In read and write we call to_iopages on the buffers, and this raises an exception(!!) if any of the buffers is not exactly 4096 bytes. This means that we simply can't use a block device if the backing block device has a sector size greater than 4096 bytes.
if x.Cstruct.len <>4096then raise Buffer_not_exactly_one_page;
So the issues I see are:
the sector size can't be smaller than 512 bytes (but that's maybe ok)
there's an implicit expectation that the mirage-exposed sector size (the one from Mirage_block.S.get_info) is exactly 4096 bytes
one can't write or read from/into buffers larger than 4096 bytes, let's say one sector. The mirage-block documentation doesn't explicitly allow this, but this is like in mirage-block-solo5.
an exception is raised if any of the buffers isn't exactly 4096 bytes instead of returning an error. And the exception is not exposed, either!
The text was updated successfully, but these errors were encountered:
The sector size in mirage-block-xen is at least 4096 bytes no matter what the backing block device may report. I think there could be issues if the backing block device is actually 512 bytes although that should be rare today I guess.
mirage-block-xen/lib/front/blkfront.ml
Line 355 in 601a4db
In
read
andwrite
we callto_iopages
on the buffers, and this raises an exception(!!) if any of the buffers is not exactly 4096 bytes. This means that we simply can't use a block device if the backing block device has a sector size greater than 4096 bytes.mirage-block-xen/lib/front/blkfront.ml
Line 461 in 601a4db
So the issues I see are:
Mirage_block.S.get_info
) is exactly 4096 bytesThe text was updated successfully, but these errors were encountered: