I want to use aio_write64 on raw device , eg. /dev/rtestlv. the code
likes:
s_aiocb64.aio_whence = SEEK_SET;
s_aiocb64.aio_offset = ul_offset;
s_aiocb64.aio_buf = char_buffer;
s_aiocb64.aio_nbytes = ul_nbytes;
if(aio_write64(fid, &s_aiocb64) < 0)
{
fprintf(stderr,"aio_write64 errno:%d\n",errno);
perror("aio_write64");
return(1);
but the aio_write64 always returns EINVAL: Indicates that theQuote:}
aio_whence field does not have a valid value or that the resulting
pointer is not valid.
but the same code works well with block device, eg. /dev/testlv and
jfs file.
can anyone tell me how to use aio_write64 with raw device? many
thanks.