[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC v3 2/5] scsi: SCSIDiskReq declaration moved to h
From: |
Alexander Bezzubikov |
Subject: |
[Qemu-devel] [PATCH RFC v3 2/5] scsi: SCSIDiskReq declaration moved to header |
Date: |
Wed, 19 Aug 2015 13:57:20 +0300 |
Signed-off-by: Alexander Bezzubikov <address@hidden>
---
hw/scsi/scsi-disk.c | 12 ------------
include/hw/scsi/scsi.h | 13 +++++++++++++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 64f0694..8626eba 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -53,18 +53,6 @@ do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
typedef struct SCSIDiskState SCSIDiskState;
-typedef struct SCSIDiskReq {
- SCSIRequest req;
- /* Both sector and sector_count are in terms of qemu 512 byte blocks. */
- uint64_t sector;
- uint32_t sector_count;
- uint32_t buflen;
- bool started;
- struct iovec iov;
- QEMUIOVector qiov;
- BlockAcctCookie acct;
-} SCSIDiskReq;
-
#define SCSI_DISK_F_REMOVABLE 0
#define SCSI_DISK_F_DPOFUA 1
#define SCSI_DISK_F_NO_REMOVABLE_DEVOPS 2
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index cdaf0f8..e25fd70 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -6,6 +6,7 @@
#include "hw/block/block.h"
#include "sysemu/sysemu.h"
#include "qemu/notify.h"
+#include "block/accounting.h"
#define MAX_SCSI_DEVS 255
@@ -120,6 +121,18 @@ extern const VMStateDescription vmstate_scsi_device;
.offset = vmstate_offset_value(_state, _field, SCSIDevice), \
}
+typedef struct SCSIDiskReq {
+ SCSIRequest req;
+ /* Both sector and sector_count are in terms of qemu 512 byte blocks. */
+ uint64_t sector;
+ uint32_t sector_count;
+ uint32_t buflen;
+ bool started;
+ struct iovec iov;
+ QEMUIOVector qiov;
+ BlockAcctCookie acct;
+} SCSIDiskReq;
+
/* cdrom.c */
int cdrom_read_toc(int nb_sectors, uint8_t *buf, int msf, int start_track);
int cdrom_read_toc_raw(int nb_sectors, uint8_t *buf, int msf, int session_num);
--
2.1.4
- [Qemu-devel] [PATCH RFC v3 0/5] QEMU ATAPI-SCSI bridge GSoC project, Alexander Bezzubikov, 2015/08/19
- [Qemu-devel] [PATCH RFC v3 2/5] scsi: SCSIDiskReq declaration moved to header,
Alexander Bezzubikov <=
- [Qemu-devel] [PATCH RFC v3 5/5] ide: ATAPI-SCSI bridge transfer is treated as PIO, Alexander Bezzubikov, 2015/08/19
- [Qemu-devel] [PATCH RFC v3 3/5] ide: necessary checks corrected to treat ATAPI-SCSI bridge as CDROM, Alexander Bezzubikov, 2015/08/19
- [Qemu-devel] [PATCH RFC v3 1/5] ide: ATAPI-SCSI bridge TypeInfo and init function created, Alexander Bezzubikov, 2015/08/19
- [Qemu-devel] [PATCH RFC v3 4/5] ATAPI-SCSI bridge functions created an can be used by bridge, Alexander Bezzubikov, 2015/08/19
- Re: [Qemu-devel] [PATCH RFC v3 0/5] QEMU ATAPI-SCSI bridge GSoC project, Hannes Reinecke, 2015/08/19