| @@ -643,34 +643,40 @@ struct blkif_request_discard { | | | @@ -643,34 +643,40 @@ struct blkif_request_discard { |
643 | uint8_t flag; /* BLKIF_DISCARD_SECURE or zero */ | | 643 | uint8_t flag; /* BLKIF_DISCARD_SECURE or zero */ |
644 | #define BLKIF_DISCARD_SECURE (1<<0) /* ignored if discard-secure=0 */ | | 644 | #define BLKIF_DISCARD_SECURE (1<<0) /* ignored if discard-secure=0 */ |
645 | blkif_vdev_t handle; /* same as for read/write requests */ | | 645 | blkif_vdev_t handle; /* same as for read/write requests */ |
646 | uint64_t id; /* private guest value, echoed in resp */ | | 646 | uint64_t id; /* private guest value, echoed in resp */ |
647 | blkif_sector_t sector_number;/* start sector idx on disk */ | | 647 | blkif_sector_t sector_number;/* start sector idx on disk */ |
648 | uint64_t nr_sectors; /* number of contiguous sectors to discard*/ | | 648 | uint64_t nr_sectors; /* number of contiguous sectors to discard*/ |
649 | }; | | 649 | }; |
650 | typedef struct blkif_request_discard blkif_request_discard_t; | | 650 | typedef struct blkif_request_discard blkif_request_discard_t; |
651 | | | 651 | |
652 | struct blkif_request_indirect { | | 652 | struct blkif_request_indirect { |
653 | uint8_t operation; /* BLKIF_OP_INDIRECT */ | | 653 | uint8_t operation; /* BLKIF_OP_INDIRECT */ |
654 | uint8_t indirect_op; /* BLKIF_OP_{READ/WRITE} */ | | 654 | uint8_t indirect_op; /* BLKIF_OP_{READ/WRITE} */ |
655 | uint16_t nr_segments; /* number of segments */ | | 655 | uint16_t nr_segments; /* number of segments */ |
| | | 656 | #ifndef __i386__ |
| | | 657 | uint32_t _pad1; |
| | | 658 | #endif |
656 | uint64_t id; /* private guest value, echoed in resp */ | | 659 | uint64_t id; /* private guest value, echoed in resp */ |
657 | blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ | | 660 | blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ |
658 | blkif_vdev_t handle; /* same as for read/write requests */ | | 661 | blkif_vdev_t handle; /* same as for read/write requests */ |
| | | 662 | uint16_t _pad2; |
659 | grant_ref_t indirect_grefs[BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST]; | | 663 | grant_ref_t indirect_grefs[BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST]; |
660 | #ifdef __i386__ | | 664 | #ifndef __i386__ |
661 | uint64_t pad; /* Make it 64 byte aligned on i386 */ | | 665 | uint32_t _pad3; /* Make it 64 byte aligned */ |
| | | 666 | #else |
| | | 667 | uint64_t _pad3; /* Make it 64 byte aligned */ |
662 | #endif | | 668 | #endif |
663 | }; | | 669 | } __packed; |
664 | typedef struct blkif_request_indirect blkif_request_indirect_t; | | 670 | typedef struct blkif_request_indirect blkif_request_indirect_t; |
665 | | | 671 | |
666 | struct blkif_response { | | 672 | struct blkif_response { |
667 | uint64_t id; /* copied from request */ | | 673 | uint64_t id; /* copied from request */ |
668 | uint8_t operation; /* copied from request */ | | 674 | uint8_t operation; /* copied from request */ |
669 | int16_t status; /* BLKIF_RSP_??? */ | | 675 | int16_t status; /* BLKIF_RSP_??? */ |
670 | }; | | 676 | }; |
671 | typedef struct blkif_response blkif_response_t; | | 677 | typedef struct blkif_response blkif_response_t; |
672 | | | 678 | |
673 | /* | | 679 | /* |
674 | * STATUS RETURN CODES. | | 680 | * STATUS RETURN CODES. |
675 | */ | | 681 | */ |
676 | /* Operation not supported (only happens on barrier writes). */ | | 682 | /* Operation not supported (only happens on barrier writes). */ |