linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Christian Hoff <christian.hoff@de.ibm.com>,
	BORNTRAE@linux.vnet.ibm.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	mst@redhat.com, rusty@rustcorp.com.au
Subject: Re: Pe: [PATCH v5 1/3] virtio-scsi: first version
Date: Mon, 13 Feb 2012 10:19:56 +0100	[thread overview]
Message-ID: <4F38D5BC.8010705@redhat.com> (raw)
In-Reply-To: <1329077777.21613.60.camel@dabdike.int.hansenpartnership.com>

On 02/12/2012 09:16 PM, James Bottomley wrote:
> Well, no-one's yet answered the question I had about why.  virtio-scsi
> seems to be a basic duplication of virtio-blk except that it seems to
> fix some problems virtio-blk has.  Namely queue parameter discover,
> which virtio-blk doesn't seem to do.

The biggest differences between virtio-blk and virtio-scsi are that:

1) how the feature set is defined.  virtio-blk defines the feature set 
of the device through a shared spec between the guest and the host.  The 
virtio-scsi spec does not define a feature set for the devices, only for 
the transport.  Introducing new features in the guest does not need to 
be done specifically for virt, it can be done in generic code (sd.c). 
This results in a large feature set and at the same time a very stable spec.

Right now virtio-blk covers common usecases nicely.  However, the Linux 
block layer _is_ growing support for new operations: discard is already 
there, write same is in the works, extended copy will also come in due 
time.  Perhaps we'll add them to virtio-blk, perhaps not.  If we will, 
we will have to modify the spec, the host implementation, and the guest 
drivers for each possible guest OS.  virtio-scsi will support them 
transparently.  Depending on your configuration, it might work without 
touching the host at all.


2) for disks with SCSI attachment, the native interface is exposed 
precisely as it is in the host.  I think we had some misunderstanding 
WRT queue parameter discovery.  My concern with virtio-blk's SG_IO 
support is more general than that.  It is that SG_IO accesses the host 
disk, not the guest disk.  They will have the same data, but they are 
effectively different disks.  For example they might have different 
queue parameters, hence the misunderstanding.

People are mostly using the SG_IO interface for sane purposes.  For 
example you can ping the storage with INQUIRY commands to detect 
problems on the NAS or SAN.  For these usecases the difference does not 
matter.  However, there _are_ worrisome usecases for SG_IO that people 
are looking at.  For example installing vendor backup tools in their 
guests.  These tools send vendor-specific commands to the disks. 
Nothing particularly insane about that, but we want them to do it using 
a saner interface than VIRTIO_BLK_T_SCSI_CMD.


On top of this, only virtio-scsi obviously will support devices such as 
tapes.

> There may also be a reason to cut the stack lower down.  Error
> handling is most often cited for this, but no-one's satisfactorily
> explaned why it's better to do error handling in the guest instead of
> the host.

It's not necessarily better.  However error handling in the host may 
simply not be there.  This is for example the case of NFS-based storage 
with the "hard" option.

Paolo

  parent reply	other threads:[~2012-02-13  9:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06  9:51 Pe: [PATCH v5 1/3] virtio-scsi: first version Christian Hoff
2012-02-07  9:54 ` Paolo Bonzini
2012-02-07 11:10   ` Michael S. Tsirkin
2012-02-07 11:26     ` Paolo Bonzini
2012-02-07 11:56   ` Christian Borntraeger
2012-02-07 12:31     ` Paolo Bonzini
2012-02-07 13:18       ` Christian Borntraeger
2012-02-07 13:59         ` Christian Hoff
2012-02-07 14:28           ` Paolo Bonzini
2012-02-08 13:37             ` Christian Hoff
2012-02-09  9:25               ` Paolo Bonzini
2012-02-09 12:18                 ` Christian Hoff
2012-02-12 20:16                 ` James Bottomley
2012-02-12 23:41                   ` Rusty Russell
2012-02-13  7:05                   ` Christian Borntraeger
2012-02-13  7:57                     ` Dor Laor
2012-02-13 12:40                       ` Nicholas A. Bellinger
2012-02-13 12:54                         ` Dor Laor
2012-02-13 13:00                           ` Michael S. Tsirkin
2012-02-13 13:13                             ` ronnie sahlberg
2012-02-13 13:17                               ` Paolo Bonzini
2012-02-13 13:18                               ` Michael S. Tsirkin
2012-02-13 15:12                                 ` Hannes Reinecke
2012-02-13 20:42                                   ` ronnie sahlberg
2012-02-13 20:53                                     ` ronnie sahlberg
2012-02-13 22:59                                       ` Michael S. Tsirkin
2012-02-13 23:30                                         ` ronnie sahlberg
2012-02-13 23:33                                           ` Michael S. Tsirkin
2012-02-14  0:49                                             ` ronnie sahlberg
2012-02-14  1:11                                               ` Michael S. Tsirkin
2012-02-14  9:57                                                 ` Paolo Bonzini
2012-02-13 11:08                     ` Bart Van Assche
2012-02-13  9:19                   ` Paolo Bonzini [this message]
2012-02-14  0:07                     ` Rusty Russell

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=4F38D5BC.8010705@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=BORNTRAE@linux.vnet.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=christian.hoff@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=rusty@rustcorp.com.au \
    /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).