From: Dan Smith <danms@us.ibm.com>
To: xen-devel@lists.xensource.com
Cc: robert@xensource.com
Subject: Re: [Xen-changelog] The dom destroy path is doing a dom_get on a non-existent domain to
Date: Wed, 14 Sep 2005 18:07:57 -0700 [thread overview]
Message-ID: <87wtlji1ea.fsf@us.ibm.com> (raw)
In-Reply-To: E1EFftK-00037x-UP@xenbits.xensource.com
> # HG changeset patch
> # User shand@ubuntu.eng.hq.xensource.com
> # Node ID fb72c78604c673bb07915675620bce3b7630e323
> # Parent 122779b57b40600dcaf2d147ca82ec23da8e2c96
<snip>
> It then handles the exception in dom_get by returning None, which
> callers already expect to mean failure.
This is not actually true, right? There are several places in the
code that blindly use the return value of dom_get(), assuming that it
is actually anything but None. The closest example is in the update()
function, several lines down:
self.info = info or dom_get(self.domid)
self.memory = self.info['mem_kb'] / 1024
Clearly, we need to decide what behavior dom_get() is expected to
have. Do we expect it to return None if the domid is not found, or do
we expect the domain we're asking about to always be present
(i.e. throw an exception if not)?
If nobody has strong feelings either way, I'll work up a patch to fix
it.
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com
next parent reply other threads:[~2005-09-15 1:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1EFftK-00037x-UP@xenbits.xensource.com>
2005-09-15 1:07 ` Dan Smith [this message]
2005-09-15 1:31 ` Re: [Xen-changelog] The dom destroy path is doing a dom_get on a non-existent domain to Robert Read
2005-09-15 17:28 ` Mark Williamson
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=87wtlji1ea.fsf@us.ibm.com \
--to=danms@us.ibm.com \
--cc=robert@xensource.com \
--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.