From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH v7 3/5] libxl: add support for vscsi Date: Mon, 8 Feb 2016 12:44:39 +0100 Message-ID: <20160208114439.GA7645@aepfle.de> References: <1454667175-24282-1-git-send-email-olaf@aepfle.de> <1454667175-24282-4-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1454667175-24282-4-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Jackson , Wei Liu , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, Feb 05, Olaf Hering wrote: > +int xlu_vscsi_detach(XLU_Config *cfg, libxl_ctx *ctx, uint32_t domid, char *str) > +{ > + if (vc->num_vscsidevs > 1) { > + /* Remove single vscsidev connected to this vscsictrl */; > + ctrl.devid = vc->devid; > + ctrl.vscsidevs[0].vscsidev_id = vd->vscsidev_id; > + libxl_device_vscsidev_remove(ctx, domid, &ctrl, NULL); > + } else { > + /* Wipe entire vscsictrl */; > + libxl_device_vscsictrl_remove(ctx, domid, vc, NULL); In this version I have moved the decision to remove vscsictrl into libxlu. I wonder if thats a valid approach. Should there be a libxl_device_vscsidev_remove which takes a *vscsidev, walks the list of vscsictrls in xenstore and then calls either a variant of libxl_device_vscsictrl_remove or libxl__device_vscsidev_rm? Please advice. Olaf