From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPF8a-0005aK-5z for qemu-devel@nongnu.org; Wed, 25 May 2011 10:32:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPF8Z-00015R-8Z for qemu-devel@nongnu.org; Wed, 25 May 2011 10:32:40 -0400 Received: from verein.lst.de ([213.95.11.211]:52065 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPF8Z-00015B-3u for qemu-devel@nongnu.org; Wed, 25 May 2011 10:32:39 -0400 Date: Wed, 25 May 2011 15:13:55 +0200 From: Christoph Hellwig Message-ID: <20110525131355.GC2283@lst.de> References: <1305903817-25476-1-git-send-email-pbonzini@redhat.com> <1305903817-25476-5-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1305903817-25476-5-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH 4/6] scsi-disk: allow customization of the lun List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org > case REPORT_LUNS: > + assert(!s->lun); Besides REPORT_LUNS really belonging into the core code as mentioned before the assert seems dangerous to me. What protects a guest from issuing a REPORT LUNS for a non-zero LUN and hitting this assert? Note that SPC explicitly allows sending REPORT LUNS to either LUN 0 or the well known LUN if it exists, even if at least Linux doesn't make use of the latter yet.