qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Forbid to pass lun 0 to iscsi driver


From: Peter Lieven
Subject: Re: [Qemu-devel] Forbid to pass lun 0 to iscsi driver
Date: Mon, 03 Aug 2015 08:45:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]