Re: [PATCH] block: fix crash on zero-length unaligned write and read

2020-02-07 Thread Vladimir Sementsov-Ogievskiy
07.02.2020 19:47, Stefan Hajnoczi wrote: On Thu, Feb 06, 2020 at 07:42:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: Commit 7a3f542fbd "block/io: refactor padding" occasionally dropped aligning for zero-length request: bdrv_init_padding() blindly return false if bytes == 0, like there is nothi

Re: [PATCH] block: fix crash on zero-length unaligned write and read

2020-02-07 Thread Stefan Hajnoczi
On Thu, Feb 06, 2020 at 07:42:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Commit 7a3f542fbd "block/io: refactor padding" occasionally dropped > aligning for zero-length request: bdrv_init_padding() blindly return > false if bytes == 0, like there is nothing to align. > > This leads the follo

Re: [PATCH] block: fix crash on zero-length unaligned write and read

2020-02-06 Thread Max Reitz
On 06.02.20 17:42, Vladimir Sementsov-Ogievskiy wrote: > Commit 7a3f542fbd "block/io: refactor padding" occasionally dropped > aligning for zero-length request: bdrv_init_padding() blindly return > false if bytes == 0, like there is nothing to align. > > This leads the following command to crash:

[PATCH] block: fix crash on zero-length unaligned write and read

2020-02-06 Thread Vladimir Sementsov-Ogievskiy
Commit 7a3f542fbd "block/io: refactor padding" occasionally dropped aligning for zero-length request: bdrv_init_padding() blindly return false if bytes == 0, like there is nothing to align. This leads the following command to crash: ./qemu-io --image-opts -c 'write 1 0' \ driver=blkdebug,align=