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

Re: [PATCH v6 06/18] libxl: write qemu arguments into separate xenstore keys

  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Mon, 18 May 2020 17:34:41 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 18 May 2020 16:34:53 +0000
  • Ironport-sdr: Q3jbo6O4LYW6cbIn/QuEaplO4s0geX/mDEzvnfGuEkLEkqNQGsYNrWufn/wWHO63ocU7LJtjE6 bj7SYEOnEzEnQ1Fio4i4GEoD1sxa77eJpnHzA+ts2SIhr1WME1I93Szf3WnCqEaXpYuWjlUSu/ f8xmtHaGSq6Owi7eiq/zOubIeaaDlL6UGQ6RNMytn/0H83/Ek1vQSXQlC7iO7VoaIlly53HUzD yODUDz2AWZBjTqKdO86rYrhrnporMzDxI8qryRZETviUl0QO27r1nC+VzYDzHlGvCZ81tDOIiC qMk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Jason Andryuk writes ("Re: [PATCH v6 06/18] libxl: write qemu arguments into 
separate xenstore keys"):
> On Mon, May 18, 2020 at 10:20 AM Ian Jackson <ian.jackson@xxxxxxxxxx> wrote:
> > I think this should be "goto out".  That conforms to standard libxl
> > error handling discipline and avoids future leak bugs etc.
> > libxl__xs_transaction_abort is a no-op with t==NULL.
> >
> > Also, it is not clear to me why you chose to put this outside the
> > transaction loop.  Can you either put it inside the transaction loop,
> > or produce an explanation as to why this approach is race-free...
> I just matched the old code's transaction only around the write.  "vm"
> shouldn't change during runtime, but I can make the changes as you
> suggest.

Ah I see.  I hadn't spotted this duplication.

As there is only one caller of libxl__write_stub_dmargs the messing
about with %d/vm and the transaction and so on could be factored out
and only the actual arg processing made conditional.

I would prefer that, to be honest.  But I don't want to derail this
series at this point by asking you to take on refactorings that I
ought to have asked for sooner.

So I'll take it if you make the new code the way I like it, as I
suggest above.  Maybe it will be refactored later (perhaps even by




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