All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?
@ 2017-08-04 12:16 Markus Armbruster
  2017-08-04 12:31 ` [Qemu-devel] Is the use of bdrv_getlength() in parallels.c kosher? (was: Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?) Markus Armbruster
  2017-08-04 13:08 ` [Qemu-devel] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher? Denis V. Lunev
  0 siblings, 2 replies; 5+ messages in thread
From: Markus Armbruster @ 2017-08-04 12:16 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: qemu-devel, qemu-block, Kevin Wolf

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;
        }
        s->has_fallocate = false;
    }
#endif

bdrv_getlength() can fail.  Does it do the right thing then?  For what
it's worth, the comparison of its value is signed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-04 14:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 12:16 [Qemu-devel] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher? Markus Armbruster
2017-08-04 12:31 ` [Qemu-devel] Is the use of bdrv_getlength() in parallels.c kosher? (was: Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?) Markus Armbruster
2017-08-04 13:10   ` [Qemu-devel] Is the use of bdrv_getlength() in parallels.c kosher? Denis V. Lunev
2017-08-04 13:08 ` [Qemu-devel] Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher? Denis V. Lunev
2017-08-04 14:20   ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.