From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Jonathan Davies <jonathan.davies@citrix.com>
Cc: David Scott <dave@recoil.org>, Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] oxenstored: Quota.merge: don't assume domain already exists
Date: Mon, 16 Nov 2015 12:08:06 +0000 [thread overview]
Message-ID: <1447675686.27871.46.camel@citrix.com> (raw)
In-Reply-To: <22083.24008.710618.542509@mariner.uk.xensource.com>
On Wed, 2015-11-11 at 15:24 +0000, Ian Jackson wrote:
> Jonathan Davies writes ("[PATCH] oxenstored: Quota.merge: don't assume
> domain already exists"):
> > In Quota.merge, we merge two quota hashtables, orig_quota and
> > mod_quota, putting
> > the results into dest_quota. These hashtables map domids to the number
> > of
> > entries currently owned by that domain.
> >
> > When mod_quota contains an entry for a domid that was not present in
> > orig_quota
> > (or dest_quota), the call to get_entry caused Quota.merge to raise a
> > Not_found
> > exception. This propagates back to the client as an ENOENT error, which
> > is not
> > an appropriate return value from some operations, such as
> > transaction_end.
> >
> > This situation can arise when a transaction that introduces a domain
> > (hence
> > calling Quota.add_entry) needs to be coalesced due to concurrent
> > xenstore
> > activity.
> >
> > This patch handles the merge in the case where mod_quota contains an
> > entry not
> > present in orig_quota (or in dest_quota) by treating that hashtable as
> > having
> > existing value 0.
> >
> > Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
>
> The ocaml looks vaguely plausible. I speak enough ocaml to see that
> this looks (out of context and with my half-remembered knowledge of
> oxenstored innards) like it does what you say.
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Applied.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2015-11-16 12:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 11:21 [PATCH] oxenstored: Quota.merge: don't assume domain already exists Jonathan Davies
2015-11-11 15:24 ` Ian Jackson
2015-11-16 12:08 ` Ian Campbell [this message]
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=1447675686.27871.46.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=dave@recoil.org \
--cc=jonathan.davies@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.