diff options
author | royger <royger@FreeBSD.org> | 2015-06-12 07:50:34 +0000 |
---|---|---|
committer | royger <royger@FreeBSD.org> | 2015-06-12 07:50:34 +0000 |
commit | ecdfc8f10abb6d2e0917e148f37aafc2b8ed76f8 (patch) | |
tree | 483a8786fad7d4b3904187bc6501c46fd5d0ea5a /sys/xen/blkif.h | |
parent | a75e86bc6b9dac6636dba259df0fb6c5b731d445 (diff) | |
download | FreeBSD-src-ecdfc8f10abb6d2e0917e148f37aafc2b8ed76f8.zip FreeBSD-src-ecdfc8f10abb6d2e0917e148f37aafc2b8ed76f8.tar.gz |
xen-blk{front/back}: remove broken FreeBSD extensions
The FreeBSD extension adds a new request type, called blkif_segment_block
which has a size of 112bytes for both i386 and amd64. This is fine on
amd64, since requests have a size of 112B there also. But this is not true
for i386, where requests have a size of 108B. So on i386 we basically
overrun the ring slot when queuing a request of type blkif_segment_block_t,
which is very bad.
Remove this extension (including a cleanup of the public blkif.h header
file) from blkfront and blkback.
Sponsored by: Citrix Systems R&D
Tested-by: cperciva
Diffstat (limited to 'sys/xen/blkif.h')
-rw-r--r-- | sys/xen/blkif.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/xen/blkif.h b/sys/xen/blkif.h index 48b71ea..8a19d5d 100644 --- a/sys/xen/blkif.h +++ b/sys/xen/blkif.h @@ -46,7 +46,7 @@ struct blkif_x86_32_request { blkif_vdev_t handle; /* only for read/write requests */ uint64_t id; /* private guest value, echoed in resp */ blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ - struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK]; + struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; }; struct blkif_x86_32_response { uint64_t id; /* copied from request */ @@ -64,7 +64,7 @@ struct blkif_x86_64_request { blkif_vdev_t handle; /* only for read/write requests */ uint64_t __attribute__((__aligned__(8))) id; blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ - struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK]; + struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; }; struct blkif_x86_64_response { uint64_t __attribute__((__aligned__(8))) id; @@ -114,7 +114,7 @@ enum blkif_protocol { static void inline blkif_get_x86_32_req(blkif_request_t *dst, blkif_x86_32_request_t *src) { - int i, n = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; + int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; dst->operation = src->operation; dst->nr_segments = src->nr_segments; dst->handle = src->handle; @@ -129,7 +129,7 @@ static void inline blkif_get_x86_32_req(blkif_request_t *dst, blkif_x86_32_reque static void inline blkif_get_x86_64_req(blkif_request_t *dst, blkif_x86_64_request_t *src) { - int i, n = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; + int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; dst->operation = src->operation; dst->nr_segments = src->nr_segments; dst->handle = src->handle; |