|
@@ -75,9 +75,8 @@ extern unsigned int xenblk_max_queues;
|
|
|
struct blkif_common_request {
|
|
|
char dummy;
|
|
|
};
|
|
|
-struct blkif_common_response {
|
|
|
- char dummy;
|
|
|
-};
|
|
|
+
|
|
|
+/* i386 protocol version */
|
|
|
|
|
|
struct blkif_x86_32_request_rw {
|
|
|
uint8_t nr_segments; /* number of segments */
|
|
@@ -129,14 +128,6 @@ struct blkif_x86_32_request {
|
|
|
} u;
|
|
|
} __attribute__((__packed__));
|
|
|
|
|
|
-/* i386 protocol version */
|
|
|
-#pragma pack(push, 4)
|
|
|
-struct blkif_x86_32_response {
|
|
|
- uint64_t id; /* copied from request */
|
|
|
- uint8_t operation; /* copied from request */
|
|
|
- int16_t status; /* BLKIF_RSP_??? */
|
|
|
-};
|
|
|
-#pragma pack(pop)
|
|
|
/* x86_64 protocol version */
|
|
|
|
|
|
struct blkif_x86_64_request_rw {
|
|
@@ -193,18 +184,12 @@ struct blkif_x86_64_request {
|
|
|
} u;
|
|
|
} __attribute__((__packed__));
|
|
|
|
|
|
-struct blkif_x86_64_response {
|
|
|
- uint64_t __attribute__((__aligned__(8))) id;
|
|
|
- uint8_t operation; /* copied from request */
|
|
|
- int16_t status; /* BLKIF_RSP_??? */
|
|
|
-};
|
|
|
-
|
|
|
DEFINE_RING_TYPES(blkif_common, struct blkif_common_request,
|
|
|
- struct blkif_common_response);
|
|
|
+ struct blkif_response);
|
|
|
DEFINE_RING_TYPES(blkif_x86_32, struct blkif_x86_32_request,
|
|
|
- struct blkif_x86_32_response);
|
|
|
+ struct blkif_response __packed);
|
|
|
DEFINE_RING_TYPES(blkif_x86_64, struct blkif_x86_64_request,
|
|
|
- struct blkif_x86_64_response);
|
|
|
+ struct blkif_response);
|
|
|
|
|
|
union blkif_back_rings {
|
|
|
struct blkif_back_ring native;
|
|
@@ -281,6 +266,7 @@ struct xen_blkif_ring {
|
|
|
|
|
|
wait_queue_head_t wq;
|
|
|
atomic_t inflight;
|
|
|
+ bool active;
|
|
|
/* One thread per blkif ring. */
|
|
|
struct task_struct *xenblkd;
|
|
|
unsigned int waiting_reqs;
|