Hi
> -----Original Message-----
> From: Christoph Hellwig [mailto:[email protected]]
> Sent: Wednesday, October 10, 2012 1:21 AM
> To: Chen HanXiao
> Cc: [email protected]
> Subject: Re: [Qemu-devel] [PATCH] Use SCSI command to get size of SG
device
> 
> 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?

If we want to enable snapshot for SCSI generic device as disk image, the
size of 
SCSI generic device is needed. Function lseek could not get this, SCSI
command 
can finish the job.
Only when lseek failed would Read Capacity command be sent. 

Regards




Reply via email to