On 2017/5/12 3:15, Stefan Hajnoczi wrote:
On Wed, Apr 12, 2017 at 10:05:20PM +0800, zhanghailiang wrote:@@ -612,6 +644,16 @@ static void replication_do_checkpoint(ReplicationState *rs, Error **errp) error_propagate(errp, local_err); break; } + } else { + /* + * For shared disk, we need to force SVM to re-read metadata + * that is loaded in memory, or there will be inconsistent. + */ + bdrv_invalidate_cache(s->secondary_disk->bs, &local_err);I'm not sure this call has any effect:if (!(bs->open_flags & BDRV_O_INACTIVE)) { return; } Is BDRV_O_INACTIVE set?
No, you are right, it does not take any effect. So should we set this flag for secondary_disk ? Is it enough to set this flag only, or should we call bdrv_inactivate_recurse() ? To be honest, i'm not quite familiar with this parts. Thanks, Hailiang
