[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for
From: |
Jan Beulich |
Subject: |
Re: [Qemu-devel] [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix |
Date: |
Thu, 16 Jun 2016 04:54:19 -0600 |
>>> On 16.06.16 at 12:02, <address@hidden> wrote:
> In case the word size of the domU and qemu running the qdisk backend
> differ BLKIF_OP_DISCARD will not work reliably, as the request
> structure in the ring have different layouts for different word size.
>
> Correct this by copying the request structure in case of different
> word size element by element in the BLKIF_OP_DISCARD case, too.
>
> Signed-off-by: Juergen Gross <address@hidden>
With the indentation (tabs vs blanks) fixed
Reviewed-by: Jan Beulich <address@hidden>
And maybe ...
> @@ -82,7 +98,7 @@ static inline void blkif_get_x86_32_req(blkif_request_t
> *dst, blkif_x86_32_reque
> /* Prevent the compiler from using src->... instead. */
> barrier();
> if (dst->operation == BLKIF_OP_DISCARD) {
> - struct blkif_request_discard *s = (void *)src;
> + struct blkif_x86_32_request_discard *s = (void *)src;
... it would also be worth adding const here and ...
> @@ -105,7 +121,7 @@ static inline void blkif_get_x86_64_req(blkif_request_t
> *dst, blkif_x86_64_reque
> /* Prevent the compiler from using src->... instead. */
> barrier();
> if (dst->operation == BLKIF_OP_DISCARD) {
> - struct blkif_request_discard *s = (void *)src;
> + struct blkif_x86_64_request_discard *s = (void *)src;
... here.
Jan
Re: [Qemu-devel] [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix, Paul Durrant, 2016/06/16