Re: [Qemu-devel] [PATCH 1/2] raw-posix: fix O_DIRECT short reads

2014-08-21 Thread Benoît Canet
The Thursday 21 Aug 2014 à 13:44:07 (+0100), Stefan Hajnoczi wrote : > The following O_DIRECT read from a <512 byte file fails: > > $ truncate -s 320 test.img > $ qemu-io -n -c 'read -P 0 0 512' test.img > qemu-io: can't open device test.img: Could not read image for determining > its forma

[Qemu-devel] [PATCH 1/2] raw-posix: fix O_DIRECT short reads

2014-08-21 Thread Stefan Hajnoczi
The following O_DIRECT read from a <512 byte file fails: $ truncate -s 320 test.img $ qemu-io -n -c 'read -P 0 0 512' test.img qemu-io: can't open device test.img: Could not read image for determining its format: Invalid argument Note that qemu-io completes successfully without the -n (O_D