Re: [Qemu-devel] [PATCH v3 10/16] block/qcow2: Lock s->lock in preallocate()

2017-05-30 Thread Eric Blake
On 05/26/2017 11:55 AM, Max Reitz wrote: > preallocate() is and will be called only from places that do not lock Maybe: "that do not otherwise need to lock" > s->lock: Currently that is qcow2_create2(), as of a future patch it will > be called from qcow2_truncate(), too. > > It therefore makes s

[Qemu-devel] [PATCH v3 10/16] block/qcow2: Lock s->lock in preallocate()

2017-05-26 Thread Max Reitz
preallocate() is and will be called only from places that do not lock s->lock: Currently that is qcow2_create2(), as of a future patch it will be called from qcow2_truncate(), too. It therefore makes sense to move locking that mutex into preallocate() itself. Signed-off-by: Max Reitz --- block/