Re: [Qemu-block] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?

2017-08-04 Thread Denis V. Lunev
On 08/04/2017 03:16 PM, Markus Armbruster wrote: > Denis, you added this in commit d50d822: > > #ifdef CONFIG_FALLOCATE > if (s->has_fallocate && aiocb->aio_offset >= bdrv_getlength(aiocb->bs)) { > int ret = do_fallocate(s->fd, 0, aiocb->aio_offset, > aiocb->aio_nbytes); > if

[Qemu-block] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?

2017-08-04 Thread Markus Armbruster
Denis, you added this in commit d50d822: #ifdef CONFIG_FALLOCATE if (s->has_fallocate && aiocb->aio_offset >= bdrv_getlength(aiocb->bs)) { int ret = do_fallocate(s->fd, 0, aiocb->aio_offset, aiocb->aio_nbytes); if (ret == 0 || ret != -ENOTSUP) { return ret;