On Wed, Apr 19, 2017 at 05:43:47PM +0800, Fam Zheng wrote: > The old aio context check is hacky because when it was added we didn't > have the permission system to enforce a general rule. It only checks if > the target BDS has a BB, which is in fact insufficient because there may > be other BBs in the graph that cannot handle the aio context change. > > Do this through blk_set_aio_context interface, in backup_job_create() > which is a central place for both drive-backup and blockdev-backup, to > take care of the compatibility check. > > Also the bdrv_set_aio_context in do_drive_backup could have been > conditional, to save a recursion when possible. > > Signed-off-by: Fam Zheng <f...@redhat.com> > --- > block/backup.c | 9 +++++++++ > blockdev.c | 14 -------------- > 2 files changed, 9 insertions(+), 14 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature