Guy Albertelli galberte@neo.rr.com writes:
- The initial problem was that the CreateFile above would not
successfully translate the volume id to the associated Unix file. #3/10 fixed that.
That should go in mountmgr, it already creates the volume symlinks and manages the devices. What is needed is a way to associate a symlink with a real Unix file so that you can do reads/writes on it, not just ioctls.
- The FILE_NO_INTERMEDIATE_BUFFER flag seemed to require the O_DIRECT
flag during the Unix open. This was proven by having standard Linux code access the device. #1/10 and #9/10 fixed this.
I don't see why you'd need O_DIRECT.
- Linux requires the I/O buffer for special files (/dev/..) to be
aligned on 512 byte boundary to get the correct data. #4/10 corrects that problem for both reading and writing.
That's really ugly.