All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <liuw@liuw.name>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: Re: [PATCH] libxl: basic support for virtio disk
Date: Wed, 1 Jun 2011 22:51:25 +0800	[thread overview]
Message-ID: <BANLkTi=HZvj_7BqOAoiJ4cB99OZJmEoLTA@mail.gmail.com> (raw)
In-Reply-To: <19942.17843.474817.123371@mariner.uk.xensource.com>

On Wed, Jun 1, 2011 at 9:59 PM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:
> Wei Liu writes ("[Xen-devel] Re: [PATCH] libxl: basic support for virtio disk"):
>> Revised patch.
>>
>> Add code in libxl__device_disk_string_of_backend.
>>
>> Upper limit of virtio disk follows scsi.
>
> I'm not sure what you mean here.  Do you mean that Linux only supports
> as many virtio disks as it supports scsi disks ?  Is this a
> fundamental limitation of the virtio protocol ?
>

I asked about the limitation in qemu-devel, the answer is

"virtio-blk as used by KVM is exposed as a virtio PCI adapter.  There
is a 1:1 mapping between virtio-blk, PCI adapters, and block devices
being presented by QEMU:

1 virtio-blk device in guest == 1 virtio-pci adapter in guest == 1
block device in QEMU

The maximum number is really limited by the PCI bus, not virtio.  In
terms of coding, you should try not to impose a hard limit at all."

Thus Stefano suggest I use the same limitation as SCSI disk.

>> +                else if (strncmp(disks[i].vdev, "vd", 2) == 0)
>> +                    drive = libxl__sprintf
>> +                        (gc, "file=%s,if=virtio,index=%d,media=disk,format=%s",
>> +                         disks[i].pdev_path, disk, format);
>
> Maybe I'm missing something but this seems not to use the partition
> number at all ?
>

Also answered in qemu-devel

"Partitions are not at the virtio-blk level.  The guest operating
system will see the virtio-blk disk and scan its partition table to
determine which partitions are available.  The limit then depends on
the partitioning scheme that you use (legacy boot record, GPT, etc)."

So I'm not using the partition number here.

In fact, we should not support vda1, vda2, right?

The discussion thread is at

http://marc.info/?l=qemu-devel&m=130689044627041&w=2

> The existing code seems rather broken TBH.
>

Hmm... I'm not catching up with libxl. Should be more careful next time...

> Ian.
>

Wei.

  reply	other threads:[~2011-06-01 14:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27  2:26 [PATCH] libxl: basic support for virtio disk Wei Liu
2011-05-27 12:26 ` Stefano Stabellini
2011-05-27 13:23   ` Wei Liu
2011-05-27 15:12     ` Stefano Stabellini
2011-05-30  3:10       ` Wei Liu
2011-05-31 11:37         ` Stefano Stabellini
2011-06-01 11:09           ` Wei Liu
2011-06-01 13:59             ` Ian Jackson
2011-06-01 14:51               ` Wei Liu [this message]
2011-06-02 15:04                 ` Stefano Stabellini
2011-06-02 16:03                   ` Ian Jackson
2011-06-02 16:10                     ` Stefano Stabellini
2011-06-03  1:22                     ` Wei Liu

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='BANLkTi=HZvj_7BqOAoiJ4cB99OZJmEoLTA@mail.gmail.com' \
    --to=liuw@liuw.name \
    --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.