*Hello, I''ve checked the duplicate-check code here and I found that''s checked only in the context of one domain but not cross-domain. The thing is that we should check tap/vbd device cross-domain not to allow another guest to use the same disk image in some circumstances to prevent VM''s disk corruption. The patch included denies disk image addition under those circumstances: 1. **We''re adding read-only disk that''s already used as write-exclusive 2. **We''re adding write-shared disk that''s already used as write-exclusive 3. **We''re adding write-exclusive disk that''s already used 4. **We''re adding read-only disk that''s already used as write-shared* (because of I/O caching issues etc.) * The vif device duplicate check remains the same it was and it''s checked in the context of current domain only so that behaviour has been preserved. Michal Signed-off-by: Michal Novotny <minovotn@redhat.com> * _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefano Stabellini
2009-Jun-02 17:17 UTC
Re: [Xen-devel] [PATCH] Device duplicate check fix
Sorry for the late reply, but I only now I realized that this patch breaks stubdoms: an exception is needed to allow a disk to be shared between the guest and its own stubdom. Beside I do not see the need to add this check to xend since the same check is already present in the hotplug scripts. Michal Novotny wrote:> *Hello, > I''ve checked the duplicate-check code here and I found that''s checked > only in the context of one domain but not cross-domain. The thing is > that we should check tap/vbd device cross-domain not to allow another > guest to use the same disk image in some circumstances to prevent VM''s > disk corruption. > > The patch included denies disk image addition under those circumstances: > 1. **We''re adding read-only disk that''s already used as write-exclusive > 2. **We''re adding write-shared disk that''s already used as write-exclusive > 3. **We''re adding write-exclusive disk that''s already used > 4. **We''re adding read-only disk that''s already used as write-shared* > (because of I/O caching issues etc.) > * > The vif device duplicate check remains the same it was and it''s checked > in the context of current domain only so that behaviour has been preserved. > > Michal > > Signed-off-by: Michal Novotny <minovotn@redhat.com> > * >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
It''s already reverted, since it broke automated localhost migration tests. -- Keir On 02/06/2009 18:17, "Stefano Stabellini" <stefano.stabellini@eu.citrix.com> wrote:> Sorry for the late reply, but I only now I realized that this patch > breaks stubdoms: an exception is needed to allow a disk to be shared > between the guest and its own stubdom. > > Beside I do not see the need to add this check to xend since the same > check is already present in the hotplug scripts. > > Michal Novotny wrote: > >> *Hello, >> I''ve checked the duplicate-check code here and I found that''s checked >> only in the context of one domain but not cross-domain. The thing is >> that we should check tap/vbd device cross-domain not to allow another >> guest to use the same disk image in some circumstances to prevent VM''s >> disk corruption. >> >> The patch included denies disk image addition under those circumstances: >> 1. **We''re adding read-only disk that''s already used as write-exclusive >> 2. **We''re adding write-shared disk that''s already used as write-exclusive >> 3. **We''re adding write-exclusive disk that''s already used >> 4. **We''re adding read-only disk that''s already used as write-shared* >> (because of I/O caching issues etc.) >> * >> The vif device duplicate check remains the same it was and it''s checked >> in the context of current domain only so that behaviour has been preserved. >> >> Michal >> >> Signed-off-by: Michal Novotny <minovotn@redhat.com> >> * >> > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi, you don''t see the need to add this check to xend since the same check is already present in the hotplug scripts? So, is this useless and should I do nothing about that and let it be reverted like Keir wrote he did and do nothing about that? Michal Stefano Stabellini wrote:> Sorry for the late reply, but I only now I realized that this patch > breaks stubdoms: an exception is needed to allow a disk to be shared > between the guest and its own stubdom. > > Beside I do not see the need to add this check to xend since the same > check is already present in the hotplug scripts. > > Michal Novotny wrote: > > >> *Hello, >> I''ve checked the duplicate-check code here and I found that''s checked >> only in the context of one domain but not cross-domain. The thing is >> that we should check tap/vbd device cross-domain not to allow another >> guest to use the same disk image in some circumstances to prevent VM''s >> disk corruption. >> >> The patch included denies disk image addition under those circumstances: >> 1. **We''re adding read-only disk that''s already used as write-exclusive >> 2. **We''re adding write-shared disk that''s already used as write-exclusive >> 3. **We''re adding write-exclusive disk that''s already used >> 4. **We''re adding read-only disk that''s already used as write-shared* >> (because of I/O caching issues etc.) >> * >> The vif device duplicate check remains the same it was and it''s checked >> in the context of current domain only so that behaviour has been preserved. >> >> Michal >> >> Signed-off-by: Michal Novotny <minovotn@redhat.com> >> * >> >> > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefano Stabellini
2009-Jun-03 12:08 UTC
Re: [Xen-devel] [PATCH] Device duplicate check fix
Michal Novotny wrote:> Hi, > you don''t see the need to add this check to xend since the same check is > already present in the hotplug scripts? So, is this useless and should I > do nothing about that and let it be reverted like Keir wrote he did and > do nothing about that?I don''t feel the need for this check in Xend but I don''t mind having it either. Of course it has to properly support stubdoms, that means it must allow device sharing between a guest and its own stubdom. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel