All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Andrey Korolyov <andrey@xdel.ru>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, ronniesahlberg@gmail.com
Subject: Re: [Qemu-devel] Forbid to pass lun 0 to iscsi driver
Date: Mon, 03 Aug 2015 08:45:14 +0200	[thread overview]
Message-ID: <55BF0DFA.4000403@kamp.de> (raw)
In-Reply-To: <CABYiri9Zmm1aZzsOop7ZzwnZRufRjYYsDf-sA8xTbyoor0Ae_A@mail.gmail.com>

Am 02.08.2015 um 13:42 schrieb Andrey Korolyov:
> Hello,
>
> As we will never pass LUN#0 as a storage lun, it would be better to
> prohibit this at least in iscsi.c, otherwise it will result in an FPU
> exception and emulator crash:
>
> traps: qemu-system-x86[32430] trap divide error ip:7f1dab7b5073
> sp:7f1d713e4ae0 error:0 in block-iscsi.so[7f1dab7b0000+8000]
>
>      353 static bool is_request_lun_aligned(int64_t sector_num, int nb_sectors,
>      354                                       IscsiLun *iscsilun)
>      355 {
>      356     if ((sector_num * BDRV_SECTOR_SIZE) % iscsilun->block_size ||
>      357         (nb_sectors * BDRV_SECTOR_SIZE) % iscsilun->block_size) {
>
> As far as I can see the LUN#0 can be thrown out on a top level, as one
> will never use it directly as an iSCSI backend. Please correct me if
> I`m wrong in this assumption.

Hi Andrey,

LUN 0 is quite common on iSCSI targets. I think what causes the problem
is not the LUN ID, but the target which returns 0 for the blocksize. Which
target are you using?

Peter

  reply	other threads:[~2015-08-03  6:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-02 11:42 [Qemu-devel] Forbid to pass lun 0 to iscsi driver Andrey Korolyov
2015-08-03  6:45 ` Peter Lieven [this message]
2015-08-03  7:47   ` Andrey Korolyov
2015-08-03  7:49     ` Peter Lieven
2015-08-03  8:13     ` Paolo Bonzini
2015-08-03  8:29       ` Peter Lieven
2015-08-03  9:48       ` Andrey Korolyov

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=55BF0DFA.4000403@kamp.de \
    --to=pl@kamp.de \
    --cc=andrey@xdel.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.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.