I was able to resolve the issue caused by multiplexing where
HEADER1+DATA1...
was read as
HEADER1+HEADER2+HEADER3...
So nbdcpy is functional! and copies completely.
Though I have been trying to resolve another issue
The command below works fine (16MB)
nbdkit -v -o data ' ( 0x41 0x42 )*16777216 ' --run 'bin/nbdcpy $port
$port'
But when I use random
`nbdkit -v -o random size=16M --run 'bin/nbdcpy $port $port'`
I get
error: data written does not match expected
So, I assume my code is affected by data somehow which I am not able to find.
As it's functional now I will update the documentation to make it more
understandable and true to code and then ask for reviews from io_uring
people. I will also resume work on documenting how libnbd works and on
how to integrate io_uring with libnbd or nbdcopy.
Regards,
Abhay