qcow2: lock on prealloc
PATCH v2 2/2 qcow2: lock on prealloc
From: Zhi Yong Wu <[email protected]>
preallocate() will be locked.
Signed-off-by Zhi Yong Wu <[email protected]>
--- block/qcow2.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
block/qcow2.c +3 -0
@@ -1192,7 +1192,10 @@ static int qcow2_create2(const char *filename, int64_t total_size,/* And if we're supposed to preallocate metadata, do that now */ if (prealloc) { +BDRVQcowState *s = bs->opaque; +qemu_co_mutex_lock (&s->lock); ret =preallocate (bs); +qemu_co_mutex_unlock (&s->lock);if (ret <0 ) { goto out; }
Signature · 1 line
1.7.6
Kevin Wolf
AppliedAm 07.05.2012 10:51, schrieb [email protected]:
Quoted 5 lines
From: Zhi Yong Wu <[email protected]>
preallocate()will be locked.Signed-off-by Zhi Yong Wu <[email protected]>
Thanks, applied both to the block branch for 1.1.
Kevin