xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v8 3/5] libxl: add support for vscsi
Date: Mon, 15 Feb 2016 15:16:10 +0000	[thread overview]
Message-ID: <20160215151610.GC10489@citrix.com> (raw)
In-Reply-To: <20160212182459.GA28852@aepfle.de>

On Fri, Feb 12, 2016 at 07:24:59PM +0100, Olaf Hering wrote:
[...]
> 
> > > +    if (libxl__xs_directory(gc, XBT_NULL, be_path, &be_dirs)) {
> > > +        rc = libxl__device_vscsi_reconfigure_add(egc, aodev, &vscsi_saved, &d_config, be_path);
> > > +        if (rc)
> > > +            goto out;
> > > +        /* Notify that this is done */
> > > +        aodev->callback(egc, aodev);
> > 
> > Wouldn't it be better if you call aodev->callback unconditionally at the
> > end of this function? BTW you seem to have forgotten to set aodev->rc.
> 
> I have to rework this code, its still using libxl__wait_for_backend.
> This is already fixed in the detach case. Somehow I was only
> concentrating on the detach case this week, and did not notice this.
>

OK.

> 
> > > +/* Remove vscsidev connected to vscsictrl */
> > > +int libxl_device_vscsidev_remove(libxl_ctx *ctx, uint32_t domid,
> > > +                                 libxl_device_vscsidev *dev,
> > > +                                 const libxl_asyncop_how *ao_how)
> > > +                                 LIBXL_EXTERNAL_CALLERS_ONLY;
> > 
> > Where is libxl_device_vscsidev_add?
> 
> This is done in scsi-attach, via libxl_device_vscsictrl_add. Its not
> even, compared to the scsi-detach case. I will see if that can be
> changed.
> 
> 
> > > +    libxl__add_vscsictrls(egc, ao, domid, d_config, &dcs->multidev);
> > 
> > This is because you need vscsi disk early?
> 
> I think yes, DEFINE_DEVICES_ADD has to be used somewhere.
>

I'm confused. You're joking, right? "Has to be used somewhere" is not
a justification for having it in this particular place.

> 
> 
> > > +int main_vscsiattach(int argc, char **argv);
> > > +int main_vscsilist(int argc, char **argv);
> > > +int main_vscsidetach(int argc, char **argv);
> > 
> > What about other commands? Looking at PVUSB series:
> > 
> > +int main_usbctrl_attach(int argc, char **argv);
> > +int main_usbctrl_detach(int argc, char **argv);
> > +int main_usbdev_attach(int argc, char **argv);
> > +int main_usbdev_detach(int argc, char **argv);
> > +int main_usblist(int argc, char **argv);
> > 
> > so we should be able to attach / detach both controller and specific
> > device?
> 
> There are no empty scsi controllers, just controllers with at least one
> device. IMO its not useful to define empty controllers, what would be
> the point?

If it is mandated by hardware that empty scsi controller doesn't
exist, that's of course fine. But I don't think it is mandated in
reality? I can have no disk attached to a controller and that should
be fine.

> While toying around I noticed that removing all vscsidevs and
> leaving the vscsictrl in xenstore the frontend preserved its SCSI
> controller entry in sysfs.
>

That's what I would expect, too.

Wei.

> Olaf

  reply	other threads:[~2016-02-15 15:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 15:43 [PATCH v8 0/5] libbxl: add support for pvscsi, iteration 8 Olaf Hering
2016-02-11 15:43 ` [PATCH v8 1/5] vscsiif.h: fix WWN notation for p-dev property Olaf Hering
2016-02-12 17:28   ` Wei Liu
2016-02-11 15:43 ` [PATCH v8 2/5] docs: add vscsi to xenstore-paths.markdown Olaf Hering
2016-02-12 17:28   ` Wei Liu
2016-02-11 15:43 ` [PATCH v8 3/5] libxl: add support for vscsi Olaf Hering
2016-02-12 17:27   ` Wei Liu
2016-02-12 18:24     ` Olaf Hering
2016-02-15 15:16       ` Wei Liu [this message]
2016-02-15 15:24         ` Olaf Hering
2016-02-15 15:52           ` Wei Liu
2016-02-15 17:09         ` Ian Jackson
2016-02-16 15:23           ` Olaf Hering
2016-02-16 17:48             ` Ian Jackson
2016-02-17 11:17               ` Olaf Hering
2016-02-11 15:43 ` [PATCH v8 4/5] vscsiif.h: add some notes about xenstore layout Olaf Hering
2016-02-12 17:28   ` Wei Liu
2016-02-11 15:43 ` [PATCH v8 5/5] Scripts to create and delete xen-scsiback nodes in Linux target framework Olaf Hering
2016-02-12 17:28   ` Wei Liu
2016-02-12 18:36     ` Olaf Hering
2016-02-15  5:51       ` Juergen Gross

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=20160215151610.GC10489@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=olaf@aepfle.de \
    --cc=stefano.stabellini@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).