]> git.proxmox.com Git - qemu.git/commit - block.c
block: Add SG_IO device check in refresh_total_sectors()
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 17 May 2010 16:46:04 +0000 (09:46 -0700)
committerKevin Wolf <kwolf@redhat.com>
Fri, 21 May 2010 09:49:19 +0000 (11:49 +0200)
commit396759ad4ad5289623eb7e1993c433ad4e7b13a1
tree7c82ef927eb2ef500837645aa7c780be1fc26cd0
parentf8ea0b00e087380fa0c7309f843f67b7e2d0126a
block: Add SG_IO device check in refresh_total_sectors()

This patch adds a special case check for scsi-generic devices in
refresh_total_sectors() to skip the subsequent BlockDriver->bdrv_getlength()
that will be returning -ESPIPE from block/raw-posic.c:raw_getlength() for
BlockDriverState->sg=1 devices.

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c