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:52:29 +0000	[thread overview]
Message-ID: <20160215155229.GD10489@citrix.com> (raw)
In-Reply-To: <20160215152438.GA9048@aepfle.de>

On Mon, Feb 15, 2016 at 04:24:38PM +0100, Olaf Hering wrote:
> On Mon, Feb 15, Wei Liu wrote:
> 
> > > 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.
> 
> What would be the appropriate place? I think its there since I started
> working on it at 4.4 times.
>

Depending on what you want to do.

For example, if you grep for libxl__add_nics (defined with that macro)
you can see it being called in libxl_create.c at a later point and
libxl_dm.c when configuring backend QEMU for stubdom.

So there is two aspects of this:

1. At which point do you want the attachment to happen?
2. How should this device attachment be done?

For #1, you need to look on a higher level than that function you
modified in the patch. In you patch, the attachment is done at the
same time disks are attached before creating device model.  So my
first reply was to ask why you would that to happen at that
particular point.

For #2, in you patch you lump disk and vscsi together in one step. I
think multidev can handle your changes just fine. But I'm not sure if
that's the best practice -- for example, if either of them fails, you
can only get error message "unable to add disk devices". You can
introduce yet another step in the callback chain.

Wei.

> Olaf

  reply	other threads:[~2016-02-15 15:52 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
2016-02-15 15:24         ` Olaf Hering
2016-02-15 15:52           ` Wei Liu [this message]
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=20160215155229.GD10489@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).