I am facing data corruption issue when using libaio to read data from an iscsi disk.
Steps Performed:
- Allocate buffer(1MB) using posix_memalign with 4K Allignemnt.
- Fill the buffer with 9 before submitting io.
- Open iscsi disk with O_DIRECT flag.
- Submit read requests using io_submit of libaio
- In parallel execute vfork()
- Call io_getevents and wait for io to complete
- Check crc of buffer retrieved in io_getevents to check data is consistent or not.
The CRC matching is failed for some offset.
The CRC check is failing for some io. Before submitting io request i am filling the buffer with a pattern say '9', and i have analyzed the corrupted buffer and observed thatsome part of data in the buffer remains unchange, i.e same 9 is there in some part of buffer. The buffer is allocated with , 4K alligned using posix_memalign().
Is some one has also faced similar issue ? If there is any known limitation will you please share with me.