Il 15/06/2012 11:38, Kevin Wolf ha scritto: >> > Yet another tiny bit extracted from block mirroring, looks like it >> > should be useful for block commit too. >> > >> > Paolo Bonzini (2): >> > block: copy over job and dirty bitmap fields in bdrv_append >> > block: introduce bdrv_swap, implement bdrv_append on top of it >> > >> > block.c | 175 >> > +++++++++++++++++++++++++++++++++++++-------------------------- >> > block.h | 1 + >> > 2 files changed, 103 insertions(+), 73 deletions(-) >> > > I was really hoping we could get rid of bdrv_append() rather than extend > it and spread its use... > > What exactly do we need this for? I'm sure you have good reasons, but > with such hackish approaches the justification should be explicit.
It's part of the replacement for drive_reopen. It is used by a new command called block-job-complete when switching the device from the mirroring source to the target. Unlike drive_reopen, it is safe (it just reuses the target BDS without closing it) and asynchronous, so overall an improvement. Paolo
