Re: [Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw

2012-02-29 Thread Michael Tokarev
On 29.02.2012 20:07, Paolo Bonzini wrote: > Il 29/02/2012 17:00, Michael Tokarev ha scritto: >> And how it will be a cleanup? >> >> The whole cow code (and a few others) is not reenterant. Merely >> moving this lock/unlock stuff inth actual methods eliminates two >> current wrappers in cow_co_writ

Re: [Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw

2012-02-29 Thread Paolo Bonzini
Il 29/02/2012 17:00, Michael Tokarev ha scritto: > And how it will be a cleanup? > > The whole cow code (and a few others) is not reenterant. Merely > moving this lock/unlock stuff inth actual methods eliminates two > current wrappers in cow_co_write() and cow_co_read(), which are > exactly the s

Re: [Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw

2012-02-29 Thread Michael Tokarev
On 29.02.2012 19:53, Paolo Bonzini wrote: > Il 29/02/2012 00:54, Michael Tokarev ha scritto: >> -static coroutine_fn int cow_co_write(BlockDriverState *bs, int64_t >> sector_num, >> - const uint8_t *buf, int nb_sectors) >> +static coroutine_fn int cow_co_rw(Bloc

Re: [Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw

2012-02-29 Thread Paolo Bonzini
Il 29/02/2012 00:54, Michael Tokarev ha scritto: > -static coroutine_fn int cow_co_write(BlockDriverState *bs, int64_t > sector_num, > - const uint8_t *buf, int nb_sectors) > +static coroutine_fn int cow_co_rw(BlockDriverState *bs, int64_t sector_num, > +