Re: [Qemu-devel] [PATCH v3 1/3] raw-posix: Fix raw_co_get_block_status() after EOF

2014-10-23 Thread Max Reitz
On 2014-10-23 at 09:27, Max Reitz wrote: On 2014-10-22 at 18:57, Eric Blake wrote: On 10/22/2014 09:57 AM, Max Reitz wrote: As its comment states, raw_co_get_block_status() should unconditionally return 0 and set *pnum to 0 for after EOF. An assertion after lseek(..., SEEK_HOLE) tried to catch

Re: [Qemu-devel] [PATCH v3 1/3] raw-posix: Fix raw_co_get_block_status() after EOF

2014-10-23 Thread Max Reitz
On 2014-10-22 at 18:57, Eric Blake wrote: On 10/22/2014 09:57 AM, Max Reitz wrote: As its comment states, raw_co_get_block_status() should unconditionally return 0 and set *pnum to 0 for after EOF. An assertion after lseek(..., SEEK_HOLE) tried to catch this case by asserting that errno != -ENX

Re: [Qemu-devel] [PATCH v3 1/3] raw-posix: Fix raw_co_get_block_status() after EOF

2014-10-22 Thread Eric Blake
On 10/22/2014 09:57 AM, Max Reitz wrote: > As its comment states, raw_co_get_block_status() should unconditionally > return 0 and set *pnum to 0 for after EOF. > > An assertion after lseek(..., SEEK_HOLE) tried to catch this case by > asserting that errno != -ENXIO (which would indicate a position

[Qemu-devel] [PATCH v3 1/3] raw-posix: Fix raw_co_get_block_status() after EOF

2014-10-22 Thread Max Reitz
As its comment states, raw_co_get_block_status() should unconditionally return 0 and set *pnum to 0 for after EOF. An assertion after lseek(..., SEEK_HOLE) tried to catch this case by asserting that errno != -ENXIO (which would indicate a position after the EOF); but it should be errno != ENXIO in