X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fblock%2Fxen-blkback%2Fcommon.h;h=4a5f21e87a80b87fe698e74d119186839e668ac4;hb=cc21fe1ff77acfab555df5577ea46fc89932f3b2;hp=de09f525d6c174509af3a1e25ce6609fbb2ef1fc;hpb=fba9569924e06da076cb2ad12474bbd82d69f54d;p=pandora-kernel.git diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index de09f525d6c1..4a5f21e87a80 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -56,9 +56,6 @@ struct blkif_common_request { char dummy; }; -struct blkif_common_response { - char dummy; -}; /* i386 protocol version */ #pragma pack(push, 4) @@ -83,11 +80,6 @@ struct blkif_x86_32_request { struct blkif_x86_32_request_discard discard; } u; }; -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 */ @@ -112,18 +104,13 @@ struct blkif_x86_64_request { struct blkif_x86_64_request_discard discard; } u; }; -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; @@ -170,7 +157,7 @@ struct xen_blkif { enum blkif_protocol blk_protocol; enum blkif_backend_type blk_backend_type; union blkif_back_rings blk_rings; - struct vm_struct *blk_ring_area; + void *blk_ring; /* The VBD attached to this interface. */ struct xen_vbd vbd; /* Back pointer to the backend_info. */ @@ -198,9 +185,8 @@ struct xen_blkif { int st_wr_sect; wait_queue_head_t waiting_to_free; - - grant_handle_t shmem_handle; - grant_ref_t shmem_ref; + /* Thread shutdown wait queue. */ + wait_queue_head_t shutdown_wq; }; @@ -239,11 +225,11 @@ static inline void blkif_get_x86_32_req(struct blkif_request *dst, struct blkif_x86_32_request *src) { int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; - dst->operation = src->operation; + dst->operation = ACCESS_ONCE(src->operation); dst->nr_segments = src->nr_segments; dst->handle = src->handle; dst->id = src->id; - switch (src->operation) { + switch (dst->operation) { case BLKIF_OP_READ: case BLKIF_OP_WRITE: case BLKIF_OP_WRITE_BARRIER: @@ -268,11 +254,11 @@ static inline void blkif_get_x86_64_req(struct blkif_request *dst, struct blkif_x86_64_request *src) { int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; - dst->operation = src->operation; + dst->operation = ACCESS_ONCE(src->operation); dst->nr_segments = src->nr_segments; dst->handle = src->handle; dst->id = src->id; - switch (src->operation) { + switch (dst->operation) { case BLKIF_OP_READ: case BLKIF_OP_WRITE: case BLKIF_OP_WRITE_BARRIER: