block-backend: Defer shared_perm tightening migration completion
commit5f7772c4d0cf32f4e779fcd5a69ae4dae24aeebf
authorFam Zheng <famz@redhat.com>
Tue, 15 Aug 2017 13:07:39 +0000 (15 21:07 +0800)
committerEric Blake <eblake@redhat.com>
Tue, 15 Aug 2017 15:03:28 +0000 (15 10:03 -0500)
treef7d1089fd77f52013bea4df6e69c6e170e618ec6
parent3dff24f2dffc5f3aa46dc014122012848bd7959d
block-backend: Defer shared_perm tightening migration completion

As in the case of nbd_export_new(), bdrv_invalidate_cache() can be
called when migration is still in progress. In this case we are not
ready to tighten the shared permissions fenced by blk->disable_perm.

Defer to a VM state change handler.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170815130740.31229-4-famz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
block/block-backend.c