[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Use SCSI command to get size of SG device
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH] Use SCSI command to get size of SG device |
Date: |
Tue, 9 Oct 2012 19:21:00 +0200 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
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?