[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 01/13] tools/xenstore: don't allow creating too many nodes in a transaction



On 20.02.23 14:49, Juergen Gross wrote:
Assume node quota is 1000, and at start of the transaction the guest is owning
999 nodes. In the transaction the guest is deleting 10 nodes, then dom0 is
creating 5 additional nodes owned by the guest. The central node counter is now
1004 (over quota), while the in-transaction count is 994. In the transaction the
guest can now happily create a new node (#995) with my patch, but will fail to
do so without (it sees the 1004 due to the transaction count being ignored).

It is even worse, so I'd like to suggest the following commit message:

  tools/xenstore: take transaction internal nodes into account for quota

  The accounting for the number of nodes of a domain in an active
  transaction is not working correctly, as it is checking the node quota
  only against the number of nodes outside the transaction.

  This can result in the transaction finally failing, as node quota is
  checked at the end of the transaction again.

  On the other hand even in a transaction deleting many nodes, new nodes
  might not be creatable, in case the node quota was already reached at
  the start of the transaction.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.