All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH v5 2/8] libxl: libxl__device_disk_local_attach return a new libxl_device_disk
Date: Mon, 14 May 2012 14:06:55 +0100	[thread overview]
Message-ID: <1337000815.31817.72.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205141402350.26786@kaball-desktop>

On Mon, 2012-05-14 at 14:04 +0100, Stefano Stabellini wrote:
> On Fri, 4 May 2012, Ian Jackson wrote:
> > Stefano Stabellini writes ("[PATCH v5 2/8] libxl: libxl__device_disk_local_attach return a new libxl_device_disk"):
> > > Introduce a new libxl_device_disk** parameter to
> > > libxl__device_disk_local_attach, the parameter is allocated on the gc by
> > > libxl__device_disk_local_attach. It is going to fill it with
> > > informations about the new locally attached disk.  The new
> > > libxl_device_disk should be passed to libxl_device_disk_local_detach
> > > afterwards.
> > ...
> > > diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
> > > index fc771ff..55dc55c 100644
> > > --- a/tools/libxl/libxl_internal.c
> > > +++ b/tools/libxl/libxl_internal.c
> > ...
> > >              LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "locally attaching qdisk %s\n",
> > > -                       disk->pdev_path);
> > > +                       in_disk->pdev_path);
> > 
> > I think in_disk->pdev_path can be NULL here ?
> 
> It cannot, unless a wrong configuration was provided.

so it can?

> In that case we'll fail to open the empty disk later on.

But logging the NULL pointer doesn't seem right. If this case is invalid
we should detect it as such and error out, not carry on until some other
secondary error causes us to abort.

Ian.

  reply	other threads:[~2012-05-14 13:06 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 11:12 [PATCH v5 0/8] qdisk local attach Stefano Stabellini
2012-05-04 11:13 ` [PATCH v5 1/8] libxl: make libxl_device_disk_local_attach/detach internal functions Stefano Stabellini
2012-05-04 11:13 ` [PATCH v5 2/8] libxl: libxl__device_disk_local_attach return a new libxl_device_disk Stefano Stabellini
2012-05-04 14:40   ` Ian Campbell
2012-05-04 16:27   ` Ian Jackson
2012-05-14 13:04     ` Stefano Stabellini
2012-05-14 13:06       ` Ian Campbell [this message]
2012-05-14 14:15       ` Ian Jackson
2012-05-04 11:13 ` [PATCH v5 3/8] libxl: add a transaction parameter to libxl__device_generic_add Stefano Stabellini
2012-05-04 14:41   ` Ian Campbell
2012-05-04 11:13 ` [PATCH v5 4/8] libxl: introduce libxl__device_disk_add Stefano Stabellini
2012-04-24 10:45   ` [PATCH v4 0/8] qdisk local attach Stefano Stabellini
2012-04-24 10:45     ` [PATCH v4 1/8] libxl: make libxl_device_disk_local_attach/detach internal functions Stefano Stabellini
2012-04-24 15:16       ` Ian Campbell
2012-04-24 10:45     ` [PATCH v4 2/8] libxl: libxl__device_disk_local_attach return a new libxl_device_disk Stefano Stabellini
2012-04-24 15:02       ` Ian Jackson
2012-04-24 15:25       ` Ian Campbell
2012-04-24 10:45     ` [PATCH v4 3/8] libxl: add a transaction parameter to libxl__device_generic_add Stefano Stabellini
2012-04-24 15:34       ` Ian Jackson
2012-04-24 10:45     ` [PATCH v4 4/8] libxl: introduce libxl__device_disk_add_t Stefano Stabellini
2012-04-24 15:42       ` Ian Jackson
2012-04-24 16:02         ` Ian Jackson
2012-05-04 16:30         ` [PATCH v4 4/8] libxl: introduce libxl__device_disk_add_t [and 1 more messages] Ian Jackson
2012-04-24 10:45     ` [PATCH v4 5/8] xl/libxl: add a blkdev_start parameter Stefano Stabellini
2012-04-24 14:52       ` Ian Jackson
2012-04-24 10:45     ` [PATCH v4 6/8] libxl: introduce libxl__alloc_vdev Stefano Stabellini
2012-04-24 14:58       ` Ian Jackson
2012-04-24 15:04         ` Ian Campbell
2012-04-24 15:16           ` Ian Jackson
2012-04-24 10:45     ` [PATCH v4 7/8] xl/libxl: implement QDISK libxl_device_disk_local_attach Stefano Stabellini
2012-04-24 15:39       ` Ian Jackson
2012-04-24 10:45     ` [PATCH v4 8/8] libxl__device_disk_local_attach: wait for state "connected" Stefano Stabellini
2012-04-24 15:18       ` Ian Jackson
2012-05-04 14:49   ` [PATCH v5 4/8] libxl: introduce libxl__device_disk_add Ian Campbell
2012-05-04 11:13 ` [PATCH v5 5/8] xl/libxl: add a blkdev_start parameter Stefano Stabellini
2012-05-04 14:54   ` Ian Campbell
2012-05-04 16:32   ` Ian Jackson
2012-05-04 11:13 ` [PATCH v5 6/8] libxl: introduce libxl__alloc_vdev Stefano Stabellini
2012-05-04 14:59   ` Ian Campbell
2012-05-04 16:46     ` Ian Jackson
2012-05-04 17:08       ` Ian Campbell
2012-05-04 17:16         ` Ian Jackson
2012-05-04 17:20           ` Ian Campbell
2012-05-14 13:48     ` Stefano Stabellini
2012-05-14 13:56       ` Ian Campbell
2012-05-04 16:39   ` Ian Jackson
2012-05-14 14:10     ` Stefano Stabellini
2012-05-14 14:22       ` Ian Jackson
2012-05-14 14:43         ` Stefano Stabellini
2012-05-04 11:13 ` [PATCH v5 7/8] xl/libxl: implement QDISK libxl_device_disk_local_attach Stefano Stabellini
2012-05-04 15:11   ` Ian Campbell
2012-05-04 16:42   ` Ian Jackson
2012-05-14 14:13     ` Stefano Stabellini
2012-05-14 14:23       ` Ian Jackson
2012-05-14 14:45         ` Stefano Stabellini
2012-05-14 14:46           ` Ian Jackson
2012-05-14 14:52             ` Stefano Stabellini
2012-05-04 11:13 ` [PATCH v5 8/8] libxl__device_disk_local_attach: wait for state "connected" Stefano Stabellini
2012-05-04 15:13   ` Ian Campbell
2012-05-14 14:16     ` Stefano Stabellini
2012-05-10 13:07 ` [PATCH v5 0/8] qdisk local attach Jan Beulich
2012-05-11 15:57   ` Stefano Stabellini

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=1337000815.31817.72.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.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.