Most arguments are bytes, which must be aligned to blocks
WriteAt/ReadAt might only take block-aligned IO depending on platform and O_DIRECT
BlockCount returns the number of blocks, not bytes (maybe we should have Size())?
ReadWriteSeeker
BlockDev does not require Read/Write/Seek to be present, but these are commonly required to for example copy data onto block devices
Underlying block device can require block alignment, which would require buffering
GPT/partitions
I migrated GPT onto blockdev as it makes extensive use of the block device geometry.
Problem is that now GPT has a weird API surface where magic happens when AddPartition magically creates a section of the block device it's added to (and not updated when you change first/last block manually)
Reading/writing partitions requires creating a RWS manually.
Support for dynamically-sized block devices when backed by files.
There are a number of warts/open questions related to the blockdev design:
See also code at https://review.monogon.dev/c/monogon/+/1873
Blocks vs bytes and alignment
ReadWriteSeeker
GPT/partitions
/cc @q3k