All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Smith <danms@us.ibm.com>
To: Christian.Limpach@cl.cam.ac.uk
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] Prevent xend from starting duplicate domains
Date: Fri, 16 Sep 2005 15:49:13 -0700	[thread overview]
Message-ID: <87hdckhbme.fsf@us.ibm.com> (raw)
In-Reply-To: 3d8eece205091612407ddf69a9@mail.gmail.com


CL> There is already a check for domains with the same name in
CL> XendDomainInfo.check_name.

Ah, yes, I see that now.

CL> We should fix that check instead of adding another check.

I agree that there should be one check, but it seems counter-intuitive
(to me) to have that check where it is.  That's the reason I hadn't
noticed it before.

It seems strange to have a container class (XendDomain) that
instantiates an item object which then gets an instance of the
container to check for another domain with the same name.  Why not
have the container itself do the duplicate check?  I would argue that
the existing model is bad because the item class could not be placed
in another container.  Further, the container is enforced as a set by
the items that go in it, instead of the container itself.

If others agree, I'd be happy to submit a patch that moves the check
out of the item class and into the container class.

CL> Could you try the attached patch which removes the check if a
CL> domain "is terminated" and thus allows creation of a domain with
CL> the same name?

I did test the patch and it does prevent corruption of the list.

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com

  reply	other threads:[~2005-09-16 22:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 21:46 [PATCH] Prevent xend from starting duplicate domains Dan Smith
2005-09-13 23:20 ` David Hopwood
2005-09-14  0:06   ` Dan Smith
2005-09-14  4:32     ` Anthony Liguori
2005-09-16 19:40 ` Christian Limpach
2005-09-16 22:49   ` Dan Smith [this message]
2005-09-16 23:47     ` Christian Limpach
  -- strict thread matches above, loose matches on Subject: below --
2005-09-14 12:04 Ian Pratt
2005-09-14 13:36 ` Dan Smith
2005-09-14 17:15   ` Christian Limpach
2005-09-14 20:50 Ian Pratt
2005-09-14 21:03 ` Dan Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hdckhbme.fsf@us.ibm.com \
    --to=danms@us.ibm.com \
    --cc=Christian.Limpach@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.