From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLdUR-0001OL-N6 for qemu-devel@nongnu.org; Tue, 09 Oct 2012 13:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLdUL-00060H-Vr for qemu-devel@nongnu.org; Tue, 09 Oct 2012 13:21:07 -0400 Received: from verein.lst.de ([213.95.11.211]:51661 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLdUL-0005zk-QP for qemu-devel@nongnu.org; Tue, 09 Oct 2012 13:21:01 -0400 Date: Tue, 9 Oct 2012 19:21:00 +0200 From: Christoph Hellwig Message-ID: <20121009172100.GA23380@lst.de> References: <00c501cda602$583de850$08b9b8f0$@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00c501cda602$583de850$08b9b8f0$@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH] Use SCSI command to get size of SG device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chen HanXiao Cc: qemu-devel@nongnu.org On Tue, Oct 09, 2012 at 05:42:01PM +0800, Chen HanXiao wrote: > When we use SCSI generic device as disk image, function lseek > could not get the size of this kind of device. > So try to use SCSI command Read Capacity(10) when lseek failed to get > the size of SCSI generic device. Eww, this is ugly as hell. Why would you even need the size for a raw passthrough device?