Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jh7pA-00013i-3T for qemu-devel@nongnu.org; Wed, 02 Apr 2008 14:36:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jh7p7-0000zC-RX for qemu-devel@nongnu.org; Wed, 02 Apr 2008 14:36:39 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh7p7-0000ys-9W for qemu-devel@nongnu.org; Wed, 02 Apr 2008 14:36:37 -0400 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jh7p6-00057e-Th for qemu-devel@nongnu.org; Wed, 02 Apr 2008 14:36:37 -0400 Message-Id: <20080402181559.286859712@localhost.localdomain> Date: Wed, 02 Apr 2008 15:15:59 -0300 From: Marcelo Tosatti Subject: [Qemu-devel] [patch 0/3] properly report SCSI status codes Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ian Jackson , Paul Brook Cc: qemu-devel@nongnu.org The scsi-disk implementation passes the sense key information to the driver ->completion() callback. The LSI driver (and esp / usb storage too, apparently) are expecting a scsi status code. The sense key information should be returned in the sense buffer or later upon a REQUEST SENSE command. For example, right now the guest interprets a completed command with HARDWARE_ERROR sense key as scsi status code "CONDITION MET". As a separate note, the current barrier implementation in Linux ignores SCSI status errors (James Bottomley sent a patch to linux-scsi a few minutes ago on that). --