From: Olaf Hering <olaf@aepfle.de>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: 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 v10 4/5] libxl: add support for vscsi
Date: Fri, 8 Apr 2016 09:17:00 +0200 [thread overview]
Message-ID: <20160408071700.GA12988@aepfle.de> (raw)
In-Reply-To: <22270.44829.165824.448663@mariner.uk.xensource.com>
On Fri, Apr 01, Ian Jackson wrote:
> > +static int xlu__vscsi_parse_dev(XLU_Config *cfg, char *pdev, libxl_vscsi_hctl *hctl)
> > +{
> > + struct stat dentry;
> > + char *sysfs = NULL;
> > + const char *type;
> > + int rc, found = 0;
> > + DIR *dirp;
> > + struct dirent *de;
> ...
> > + /* /sys/dev/type/major:minor symlink added in 2.6.27 */
> > + if (asprintf(&sysfs, "/sys/dev/%s/%u:%u/device/scsi_device", type,
> > + major(dentry.st_rdev), minor(dentry.st_rdev)) < 0) {
> > + sysfs = NULL;
> > + rc = ERROR_NOMEM;
> > + goto out;
> > + }
>
> I'm not sure that this sysfs parsing ought to be in xl rather than
> libxl. Also, this is Linux-specific code. So it needs to be made
> conditional somehow.
I think this depends on how libvirt is supposed to interact with libxl
here. Right now libvirt is rather dumb, it supports just the
host:channel:target:lun notation for a backend. My patch for it (which I
have to rebase now) creates a string "pdev,vdev" and calls
xlu_vscsi_get_host. I will rebase the libvirt patch and resend it as
well.
> It seems to me that the contents of xlu__vscsi_target should be much
> closer to vscsi_pdev_type (unless I have misunderstood).
Well, if its important where that struct is supposed to be in the file,
I can move it down.
> Perhaps the libxl_types.idl API needs to change. In general, the
> libxl API ought to be close enough in semantics to the xl config API
> that the correspondence is obvious. I don't think that's the case
> here.
I'm not sure what this paragraph means.
Olaf
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-08 7:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 8:23 [PATCH v10 0/5] libxl: add support for pvscsi, iteration 10 Olaf Hering
2016-03-22 8:23 ` [PATCH v10 1/5] vscsiif.h: fix WWN notation for p-dev property Olaf Hering
2016-03-22 8:23 ` [PATCH v10 2/5] docs: add vscsi to xenstore-paths.markdown Olaf Hering
2016-03-22 8:23 ` [PATCH v10 3/5] vscsiif.h: add some notes about xenstore layout Olaf Hering
2016-03-22 8:23 ` [PATCH v10 4/5] libxl: add support for vscsi Olaf Hering
2016-03-31 8:56 ` Juergen Gross
2016-03-31 9:12 ` Olaf Hering
2016-04-01 17:25 ` Ian Jackson
2016-04-01 17:52 ` Olaf Hering
2016-04-01 18:04 ` Ian Jackson
2016-04-08 7:17 ` Olaf Hering [this message]
2016-03-22 8:23 ` [PATCH v10 5/5] Scripts to create and delete xen-scsiback nodes in Linux target framework Olaf Hering
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=20160408071700.GA12988@aepfle.de \
--to=olaf@aepfle.de \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@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).