[sheepdog] [PATCH 2/2] sheep: release object cache when vdi is released
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Tue Jan 29 09:06:11 CET 2013
At Tue, 29 Jan 2013 14:47:12 +0800,
Liu Yuan wrote:
>
> On 01/29/2013 02:39 PM, MORITA Kazutaka wrote:
> > At Tue, 29 Jan 2013 13:22:06 +0800,
> > Liu Yuan wrote:
> >>
> >> +static int local_release_vdi(struct request *req)
> >> +{
> >> + uint32_t vid = req->rq.vdi.base_vdi_id;
> >> +
> >> + if (!vid) {
> >> + sd_iprintf("Some VDI failed to release the object cache. "
> >> + "Probably you are running old QEMU.\n");
> >> + return SD_RES_SUCCESS;
> >> + }
> >> +
> >> + object_cache_flush_vdi(vid);
> >> + object_cache_delete(vid);
> >
> > I wonder if sheep should delete cache here. With this patch, object
> > cache cannot survive a temporal reboot of the guest os. Is it
> > expected behavior?
> >
>
> This is a trade off. If we don't release the object cache, then VM can't
> be safely restarted on another node without manually 'collie vdi cache
> flush vm' on the previously hosted node.
>
> As reboot of VM is really seldom operation ( EC2 even doesn't support
> reboot & shutdown), I think we can trade this for intelligence that
> doesn't require users to manually flush&del cache before migrating the
> VM. I think live migration of VM need this cache behavior too.
Agreed, applied this patch, thanks!
Kazutaka
More information about the sheepdog
mailing list