aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-11-26 15:33:49 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 09:41:36 -0600
commit9af99d980e9ff6270f291b11a064087b33dd3ab8 (patch)
treeb0ac0266b94e7024c904973dddf84b51ca14b4ec /hw/scsi.h
parent4c41d2ef5f599372a35d446fb75898fe9841bda4 (diff)
scsi: move request lists to QTAILQ.
Changes: * Move from open-coded lists to QTAILQ macros. * Move the struct elements to the common data structures (SCSIDevice + SCSIRequest). * Drop free request pools. * Fix request cleanup in the destroy callback. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index 7906877fd1..a9b846cc17 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -21,6 +21,7 @@ typedef struct SCSIRequest {
SCSIDevice *dev;
uint32_t tag;
BlockDriverAIOCB *aiocb;
+ QTAILQ_ENTRY(SCSIRequest) next;
} SCSIRequest;
struct SCSIDevice
@@ -28,6 +29,7 @@ struct SCSIDevice
DeviceState qdev;
uint32_t id;
SCSIDeviceInfo *info;
+ QTAILQ_HEAD(, SCSIRequest) requests;
};
/* cdrom.c */