qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: kwolf@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
	ronniesahlberg@gmail.com, qemu-devel@nongnu.org,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv2 11/11] iscsi: assert that sectors are aligned to LUN blocksize
Date: Tue, 02 Jul 2013 12:53:11 +0200	[thread overview]
Message-ID: <51D2B117.60707@redhat.com> (raw)
In-Reply-To: <3F0A3B75-9CDC-46D4-B0DB-4766CD691591@kamp.de>

Il 02/07/2013 12:49, Peter Lieven ha scritto:
> 
> Am 02.07.2013 um 12:44 schrieb Paolo Bonzini <pbonzini@redhat.com>:
> 
>> Il 02/07/2013 10:28, Peter Lieven ha scritto:
>>>> I agree that it's better to emit an error than to corrupt the disk.  I'm
>>>> just trying to understand what needs to be done on top of this to make 4
>>>> KB LUNs work.
>>>
>>> Reading is quite easy, you just have to have a wrapper that is reading an aligned
>>> portion of sectors around the original request and then extracting what was requested.
>>> Writing is very complicated. Requests have to be serialized, Read-Modify-Write for
>>> unaligned write requests. Paolo had all this prepared already.
>>>
>>> I wonder if it would be enough to have the block size of the host/iSCSI device propagated
>>> to the guest drivers and read 4K (or the protocol block size bytes) when probing the MBR.
>>
>> No, propagating the size of the device is only correct if we're doing
>> SCSI passthrough (-device scsi-block) and in that case we're doing it
>> already.
>>
>> For emulation, the choices are:
>>
>> 1) manually set the logical_block_size of the disk to 4096 (which means
>> the disk cannot be used as a boot disk, at least with BIOS; I don't know
>> about UEFI);
>>
>> 2) do 512e/4KN as in my patches.  You would still need to expose a 4K
>> physical_sector_size to be precise, but it is just an optimization.
> 
> This seems the more reasonable for me. Can you check what needs to be done
> to get your last version of your old series ready for upstream?
> 
> Is the exposing of a sector size > 512 byte complicated or is this something
> that is already possible with IDE, Virtio-BLK, Virtio-SCSI etc.?

It is possible with virtio-blk and SCSI with the logical_block_size
property of virtio-blk-*, scsi-hd and scsi-disk devices.  IIRC libvirt
supports it, too.

IDE only supports 512e/4KN (in general, not just in QEMU).

Paolo

> Peter
> 

  reply	other threads:[~2013-07-02 10:53 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 13:11 [Qemu-devel] [PATCHv2 00/11] iscsi/qemu-img/block-migration enhancements Peter Lieven
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 01/11] iscsi: add logical block provisioning information to iscsilun Peter Lieven
2013-07-01 13:35   ` Stefan Hajnoczi
2013-07-01 16:08     ` Peter Lieven
2013-07-10  9:19   ` Kevin Wolf
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 02/11] iscsi: read unmap info from block limits vpd page Peter Lieven
2013-07-03  3:43   ` ronnie sahlberg
2013-07-03 21:23     ` Peter Lieven
2013-07-04 12:37       ` Paolo Bonzini
2013-07-04 21:07         ` Peter Lieven
2013-07-05  6:28           ` Paolo Bonzini
2013-07-05  7:11           ` ronnie sahlberg
2013-07-06 22:15             ` Peter Lieven
2013-07-06 23:23               ` ronnie sahlberg
2013-07-10  9:23   ` Kevin Wolf
2013-07-10  9:25   ` Kevin Wolf
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 03/11] iscsi: add bdrv_co_is_allocated Peter Lieven
2013-07-01 13:46   ` Stefan Hajnoczi
2013-07-01 16:00     ` Peter Lieven
2013-07-10  9:41   ` Kevin Wolf
2013-07-10 13:49     ` Peter Lieven
2013-07-10 14:43       ` Kevin Wolf
2013-07-10 14:49         ` Peter Lieven
2013-07-10 14:54           ` Kevin Wolf
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 04/11] iscsi: add bdrv_co_write_zeroes Peter Lieven
2013-07-10  9:54   ` Kevin Wolf
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 05/11] block: add bdrv_write_zeroes() Peter Lieven
2013-07-10  9:56   ` Kevin Wolf
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 06/11] block/raw: add bdrv_co_write_zeroes Peter Lieven
2013-07-10  9:57   ` Kevin Wolf
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 07/11] iscsi: let bdrv_create conditionally zero out the device Peter Lieven
2013-07-01 13:58   ` Stefan Hajnoczi
2013-07-01 20:20   ` Paolo Bonzini
2013-07-01 21:36     ` Peter Lieven
2013-07-02  9:22       ` Paolo Bonzini
2013-07-02 10:36         ` Peter Lieven
2013-07-02 10:49           ` Paolo Bonzini
2013-07-02 10:56             ` Peter Lieven
2013-07-02 11:04               ` Paolo Bonzini
2013-07-02 11:18                 ` Peter Lieven
2013-07-10 10:14   ` Kevin Wolf
2013-07-10 13:52     ` Peter Lieven
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 08/11] block-migration: efficiently encode zero blocks Peter Lieven
2013-07-01 14:13   ` Stefan Hajnoczi
2013-07-01 15:55     ` Peter Lieven
2013-07-02  7:40       ` Stefan Hajnoczi
2013-07-02 10:51         ` Paolo Bonzini
2013-07-01 16:09     ` Peter Lieven
2013-07-02  7:36       ` Stefan Hajnoczi
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 09/11] iscsi: factor out sector conversions Peter Lieven
2013-07-10 11:29   ` Kevin Wolf
2013-07-10 14:07     ` Peter Lieven
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 10/11] iscsi: ignore aio_discard if unsupported Peter Lieven
2013-07-10 11:33   ` Kevin Wolf
2013-07-10 14:04     ` Peter Lieven
2013-07-10 14:28       ` Kevin Wolf
2013-07-10 14:49         ` Peter Lieven
2013-07-10 14:58           ` Kevin Wolf
2013-07-10 20:31             ` Peter Lieven
2013-06-27 13:11 ` [Qemu-devel] [PATCHv2 11/11] iscsi: assert that sectors are aligned to LUN blocksize Peter Lieven
2013-07-01 14:35   ` Stefan Hajnoczi
2013-07-01 15:59     ` Peter Lieven
2013-07-02  7:44       ` Stefan Hajnoczi
2013-07-02  8:28         ` Peter Lieven
2013-07-02 10:44           ` Paolo Bonzini
2013-07-02 10:49             ` Peter Lieven
2013-07-02 10:53               ` Paolo Bonzini [this message]
2013-07-10 11:38   ` Kevin Wolf
2013-07-10 14:02     ` Peter Lieven

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=51D2B117.60707@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.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 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).