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

2017-08-04 Thread Denis V. Lunev
On 08/04/2017 03:31 PM, Markus Armbruster wrote: > Same question for allocate_clusters() in parallels.c, commit 5a41e1f, > modified in commit ddd2ef2: > > if (s->data_end + space > bdrv_getlength(bs->file->bs) >> > BDRV_SECTOR_BITS) { > > bdrv_getlength() can fail. Does it do the right thing

[Qemu-block] Is the use of bdrv_getlength() in parallels.c kosher? (was: Is the use of bdrv_getlength() in handle_aiocb_write_zeroes() kosher?)

2017-08-04 Thread Markus Armbruster
Same question for allocate_clusters() in parallels.c, commit 5a41e1f, modified in commit ddd2ef2: if (s->data_end + space > bdrv_getlength(bs->file->bs) >> BDRV_SECTOR_BITS) { bdrv_getlength() can fail. Does it do the right thing then? For what it's worth, the comparison of its value is