xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
@ 2016-06-16 10:02 Juergen Gross
  2016-06-16 10:54 ` Jan Beulich
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Juergen Gross @ 2016-06-16 10:02 UTC (permalink / raw)
  To: qemu-devel, xen-devel; +Cc: anthony.perard, Juergen Gross, sstabellini, kraxel

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 <jgross@suse.com>
---
 hw/block/xen_blkif.h | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/hw/block/xen_blkif.h b/hw/block/xen_blkif.h
index e3b133b..969112f 100644
--- a/hw/block/xen_blkif.h
+++ b/hw/block/xen_blkif.h
@@ -26,6 +26,14 @@ struct blkif_x86_32_request {
 	blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
 	struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
 };
+struct blkif_x86_32_request_discard {
+    uint8_t        operation;    /* BLKIF_OP_DISCARD                     */
+    uint8_t        flag;         /* nr_segments in request struct        */
+    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)  */
+    uint64_t       nr_sectors;   /* # of contiguous sectors to discard   */
+};
 struct blkif_x86_32_response {
 	uint64_t        id;              /* copied from request */
 	uint8_t         operation;       /* copied from request */
@@ -44,6 +52,14 @@ struct blkif_x86_64_request {
 	blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
 	struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
 };
+struct blkif_x86_64_request_discard {
+    uint8_t        operation;    /* BLKIF_OP_DISCARD                     */
+    uint8_t        flag;         /* nr_segments in request struct        */
+    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)  */
+    uint64_t       nr_sectors;   /* # of contiguous sectors to discard   */
+};
 struct blkif_x86_64_response {
 	uint64_t       __attribute__((__aligned__(8))) id;
 	uint8_t         operation;       /* copied from request */
@@ -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;
 		struct blkif_request_discard *d = (void *)dst;
 		d->nr_sectors = s->nr_sectors;
 		return;
@@ -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;
 		struct blkif_request_discard *d = (void *)dst;
 		d->nr_sectors = s->nr_sectors;
 		return;
-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
  2016-06-16 10:02 [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix Juergen Gross
@ 2016-06-16 10:54 ` Jan Beulich
       [not found] ` <5762A17B02000078000F59F3@suse.com>
  2016-06-16 11:24 ` [Xen-devel] " Paul Durrant
  2 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-06-16 10:54 UTC (permalink / raw)
  To: Juergen Gross; +Cc: anthony.perard, xen-devel, sstabellini, qemu-devel, kraxel

>>> On 16.06.16 at 12:02, <JGross@suse.com> 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 <jgross@suse.com>

With the indentation (tabs vs blanks) fixed
Reviewed-by: Jan Beulich <jbeulich@suse.com>

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


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
       [not found] ` <5762A17B02000078000F59F3@suse.com>
@ 2016-06-16 11:04   ` Juergen Gross
  2016-06-16 11:17     ` Jan Beulich
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Juergen Gross @ 2016-06-16 11:04 UTC (permalink / raw)
  To: Jan Beulich; +Cc: anthony.perard, xen-devel, sstabellini, qemu-devel, kraxel

On 16/06/16 12:54, Jan Beulich wrote:
>>>> On 16.06.16 at 12:02, <JGross@suse.com> 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 <jgross@suse.com>
> 
> With the indentation (tabs vs blanks) fixed

Hmm, qemu coding style is to use blanks. I could:
a) leave the patch as is (changed lines indented with blanks)
b) use tabs to indent (style of the modified file up to now)
c) change the style of the file in this patch
d) change the style of the file in a separate patch

Any preferences?

> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
> 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.

Okay.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
  2016-06-16 11:04   ` Juergen Gross
@ 2016-06-16 11:17     ` Jan Beulich
  2016-06-16 13:07     ` Stefano Stabellini
       [not found]     ` <alpine.DEB.2.10.1606161407240.18449@sstabellini-ThinkPad-X260>
  2 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-06-16 11:17 UTC (permalink / raw)
  To: Juergen Gross; +Cc: anthony.perard, xen-devel, sstabellini, qemu-devel, kraxel

>>> On 16.06.16 at 13:04, <JGross@suse.com> wrote:
> On 16/06/16 12:54, Jan Beulich wrote:
>>>>> On 16.06.16 at 12:02, <JGross@suse.com> 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 <jgross@suse.com>
>> 
>> With the indentation (tabs vs blanks) fixed
> 
> Hmm, qemu coding style is to use blanks. I could:
> a) leave the patch as is (changed lines indented with blanks)
> b) use tabs to indent (style of the modified file up to now)
> c) change the style of the file in this patch
> d) change the style of the file in a separate patch
> 
> Any preferences?

I'd say a) is not an option, but beyond that I think this needs to be
answered by the qemu maintainers.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
  2016-06-16 10:02 [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix Juergen Gross
  2016-06-16 10:54 ` Jan Beulich
       [not found] ` <5762A17B02000078000F59F3@suse.com>
@ 2016-06-16 11:24 ` Paul Durrant
  2016-06-16 12:18   ` Juergen Gross
  2 siblings, 1 reply; 10+ messages in thread
From: Paul Durrant @ 2016-06-16 11:24 UTC (permalink / raw)
  To: Juergen Gross, qemu-devel, xen-devel; +Cc: Anthony Perard, sstabellini, kraxel

> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of
> Juergen Gross
> Sent: 16 June 2016 11:02
> To: qemu-devel@nongnu.org; xen-devel@lists.xensource.com
> Cc: Anthony Perard; Juergen Gross; sstabellini@kernel.org;
> kraxel@redhat.com
> Subject: [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64
> word size mix
> 
> 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 <jgross@suse.com>

Would it not be better to re-import the canonical blkif header as a whole rather than cherry-picking like this? You'd need to post-process to maintain style and possibly change some names for compatibility etc. but probably nothing beyond what indent and a simple [s]ed script can do.
I did broadly the same thing to re-import the netif header into Linux recently.

  Paul

> ---
>  hw/block/xen_blkif.h | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/block/xen_blkif.h b/hw/block/xen_blkif.h
> index e3b133b..969112f 100644
> --- a/hw/block/xen_blkif.h
> +++ b/hw/block/xen_blkif.h
> @@ -26,6 +26,14 @@ struct blkif_x86_32_request {
>  	blkif_sector_t sector_number;/* start sector idx on disk (r/w only)
> */
>  	struct blkif_request_segment
> seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
>  };
> +struct blkif_x86_32_request_discard {
> +    uint8_t        operation;    /* BLKIF_OP_DISCARD                     */
> +    uint8_t        flag;         /* nr_segments in request struct        */
> +    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)  */
> +    uint64_t       nr_sectors;   /* # of contiguous sectors to discard   */
> +};
>  struct blkif_x86_32_response {
>  	uint64_t        id;              /* copied from request */
>  	uint8_t         operation;       /* copied from request */
> @@ -44,6 +52,14 @@ struct blkif_x86_64_request {
>  	blkif_sector_t sector_number;/* start sector idx on disk (r/w only)
> */
>  	struct blkif_request_segment
> seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
>  };
> +struct blkif_x86_64_request_discard {
> +    uint8_t        operation;    /* BLKIF_OP_DISCARD                     */
> +    uint8_t        flag;         /* nr_segments in request struct        */
> +    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)  */
> +    uint64_t       nr_sectors;   /* # of contiguous sectors to discard   */
> +};
>  struct blkif_x86_64_response {
>  	uint64_t       __attribute__((__aligned__(8))) id;
>  	uint8_t         operation;       /* copied from request */
> @@ -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;
>  		struct blkif_request_discard *d = (void *)dst;
>  		d->nr_sectors = s->nr_sectors;
>  		return;
> @@ -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;
>  		struct blkif_request_discard *d = (void *)dst;
>  		d->nr_sectors = s->nr_sectors;
>  		return;
> --
> 2.6.6
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
  2016-06-16 11:24 ` [Xen-devel] " Paul Durrant
@ 2016-06-16 12:18   ` Juergen Gross
  2016-06-16 12:23     ` Paul Durrant
  0 siblings, 1 reply; 10+ messages in thread
From: Juergen Gross @ 2016-06-16 12:18 UTC (permalink / raw)
  To: Paul Durrant, qemu-devel, xen-devel; +Cc: Anthony Perard, sstabellini, kraxel

On 16/06/16 13:24, Paul Durrant wrote:
>> -----Original Message-----
>> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of
>> Juergen Gross
>> Sent: 16 June 2016 11:02
>> To: qemu-devel@nongnu.org; xen-devel@lists.xensource.com
>> Cc: Anthony Perard; Juergen Gross; sstabellini@kernel.org;
>> kraxel@redhat.com
>> Subject: [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64
>> word size mix
>>
>> 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 <jgross@suse.com>
> 
> Would it not be better to re-import the canonical blkif header as a whole rather than cherry-picking like this? You'd need to post-process to maintain style and possibly change some names for compatibility etc. but probably nothing beyond what indent and a simple [s]ed script can do.
> I did broadly the same thing to re-import the netif header into Linux recently.

It's a little bit more than indent/sed, but nothing really scary.

I'll do it.


Juergen

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
  2016-06-16 12:18   ` Juergen Gross
@ 2016-06-16 12:23     ` Paul Durrant
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Durrant @ 2016-06-16 12:23 UTC (permalink / raw)
  To: Juergen Gross, qemu-devel, xen-devel; +Cc: Anthony Perard, sstabellini, kraxel

> -----Original Message-----
> From: Juergen Gross [mailto:jgross@suse.com]
> Sent: 16 June 2016 13:19
> To: Paul Durrant; qemu-devel@nongnu.org; xen-devel@lists.xensource.com
> Cc: Anthony Perard; sstabellini@kernel.org; kraxel@redhat.com
> Subject: Re: [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64
> word size mix
> 
> On 16/06/16 13:24, Paul Durrant wrote:
> >> -----Original Message-----
> >> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of
> >> Juergen Gross
> >> Sent: 16 June 2016 11:02
> >> To: qemu-devel@nongnu.org; xen-devel@lists.xensource.com
> >> Cc: Anthony Perard; Juergen Gross; sstabellini@kernel.org;
> >> kraxel@redhat.com
> >> Subject: [Xen-devel] [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64
> >> word size mix
> >>
> >> 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 <jgross@suse.com>
> >
> > Would it not be better to re-import the canonical blkif header as a whole
> rather than cherry-picking like this? You'd need to post-process to maintain
> style and possibly change some names for compatibility etc. but probably
> nothing beyond what indent and a simple [s]ed script can do.
> > I did broadly the same thing to re-import the netif header into Linux
> recently.
> 
> It's a little bit more than indent/sed, but nothing really scary.
> 
> I'll do it.
>

Cool. The nice thing about bringing the header up-to-date is it pulls in all the newer comments and explanations too :-)
 
  Paul

> 
> Juergen

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
  2016-06-16 11:04   ` Juergen Gross
  2016-06-16 11:17     ` Jan Beulich
@ 2016-06-16 13:07     ` Stefano Stabellini
       [not found]     ` <alpine.DEB.2.10.1606161407240.18449@sstabellini-ThinkPad-X260>
  2 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2016-06-16 13:07 UTC (permalink / raw)
  To: Juergen Gross
  Cc: sstabellini, qemu-devel, kraxel, Jan Beulich, anthony.perard, xen-devel

On Thu, 16 Jun 2016, Juergen Gross wrote:
> On 16/06/16 12:54, Jan Beulich wrote:
> >>>> On 16.06.16 at 12:02, <JGross@suse.com> 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 <jgross@suse.com>
> > 
> > With the indentation (tabs vs blanks) fixed
> 
> Hmm, qemu coding style is to use blanks. I could:
> a) leave the patch as is (changed lines indented with blanks)
> b) use tabs to indent (style of the modified file up to now)
> c) change the style of the file in this patch
> d) change the style of the file in a separate patch
> 
> Any preferences?

I would go with d), fixing it to conform with QEMU coding style.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
       [not found]     ` <alpine.DEB.2.10.1606161407240.18449@sstabellini-ThinkPad-X260>
@ 2016-06-16 13:49       ` Juergen Gross
       [not found]       ` <5762AE7B.4030402@suse.com>
  1 sibling, 0 replies; 10+ messages in thread
From: Juergen Gross @ 2016-06-16 13:49 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: anthony.perard, xen-devel, qemu-devel, Jan Beulich, kraxel

On 16/06/16 15:07, Stefano Stabellini wrote:
> On Thu, 16 Jun 2016, Juergen Gross wrote:
>> On 16/06/16 12:54, Jan Beulich wrote:
>>>>>> On 16.06.16 at 12:02, <JGross@suse.com> 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 <jgross@suse.com>
>>>
>>> With the indentation (tabs vs blanks) fixed
>>
>> Hmm, qemu coding style is to use blanks. I could:
>> a) leave the patch as is (changed lines indented with blanks)
>> b) use tabs to indent (style of the modified file up to now)
>> c) change the style of the file in this patch
>> d) change the style of the file in a separate patch
>>
>> Any preferences?
> 
> I would go with d), fixing it to conform with QEMU coding style.

As I'm about to resync the header with the Linux one as Paul suggested
it will be more like c). :-)


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
       [not found]       ` <5762AE7B.4030402@suse.com>
@ 2016-06-17 16:07         ` Stefano Stabellini
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2016-06-17 16:07 UTC (permalink / raw)
  To: Juergen Gross
  Cc: Stefano Stabellini, qemu-devel, kraxel, Jan Beulich,
	anthony.perard, xen-devel

On Thu, 16 Jun 2016, Juergen Gross wrote:
> On 16/06/16 15:07, Stefano Stabellini wrote:
> > On Thu, 16 Jun 2016, Juergen Gross wrote:
> >> On 16/06/16 12:54, Jan Beulich wrote:
> >>>>>> On 16.06.16 at 12:02, <JGross@suse.com> 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 <jgross@suse.com>
> >>>
> >>> With the indentation (tabs vs blanks) fixed
> >>
> >> Hmm, qemu coding style is to use blanks. I could:
> >> a) leave the patch as is (changed lines indented with blanks)
> >> b) use tabs to indent (style of the modified file up to now)
> >> c) change the style of the file in this patch
> >> d) change the style of the file in a separate patch
> >>
> >> Any preferences?
> > 
> > I would go with d), fixing it to conform with QEMU coding style.
> 
> As I'm about to resync the header with the Linux one as Paul suggested
> it will be more like c). :-)
 
That's not a good idea, as you probably have noticed by now on the other
thread. This patch is OK, you just need to fix the intendation
separately.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-17 16:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 10:02 [PATCH] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix Juergen Gross
2016-06-16 10:54 ` Jan Beulich
     [not found] ` <5762A17B02000078000F59F3@suse.com>
2016-06-16 11:04   ` Juergen Gross
2016-06-16 11:17     ` Jan Beulich
2016-06-16 13:07     ` Stefano Stabellini
     [not found]     ` <alpine.DEB.2.10.1606161407240.18449@sstabellini-ThinkPad-X260>
2016-06-16 13:49       ` Juergen Gross
     [not found]       ` <5762AE7B.4030402@suse.com>
2016-06-17 16:07         ` Stefano Stabellini
2016-06-16 11:24 ` [Xen-devel] " Paul Durrant
2016-06-16 12:18   ` Juergen Gross
2016-06-16 12:23     ` Paul Durrant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).