typedef struct BlockDev BlockDev; typedef struct BlockRun BlockRun; struct BlockDev { int rfd; int wfd; /* sector size */ vlong sectsize; /* starting sector */ vlong start; /* number of sectors */ vlong nsect; }; struct BlockRun { u64int off; }; long blockread(int fd, void *buf, long blocksize, long nblocks, vlong offset); long blockwrite(int fd, void *buf, long blocksize, long nblocks, vlong offset); int blocksync(int fd);