[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [xen-unstable bisection] complete test-amd64-i386-rhel6hvm-amd



I think there is more to cleanup here.  These drivers have their
own constant, MAX_SEGMENTS_PER_REQ.  If this is the real driver
limit, it should be used consistently everywhere, but also tied to
blkif.h via a MIN() instead of directly hardcoded to 11.

I'm working on patches for this and the other isues within the
xen-unstable tree now, and will submit them for review once I
think they are ready.

--
Justin

On Feb 27, 2012, at 2:43 AM, Ian Campbell wrote:

> On Mon, 2012-02-27 at 09:32 +0000, Ian Campbell wrote:
>>> The same would go for tools/blktap*/.
>> 
>> That one never occurred to me, even after I grepped for the symbol.
> 
> I guess the following ought to fix it...
> 
> 8<---------------------------------------------------
> 
> # HG changeset patch
> # User Ian Campbell <ian.campbell@xxxxxxxxxx>
> # Date 1330335804 0
> # Node ID 42978617757ff3c8fce5c6d1873ad86d46c594ae
> # Parent  0bb45a06c1a8b049dba322cfb91c86c253068f0e
> blktap: Fix after blkif.h update
> 
> 24875:a59c1dcfe968 made an incompatible change to the interface headers which
> needs to be reflected here Fix after blkif.h update
> 
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> 
> diff -r 0bb45a06c1a8 -r 42978617757f tools/blktap/lib/blktaplib.h
> --- a/tools/blktap/lib/blktaplib.h    Mon Feb 27 09:37:45 2012 +0000
> +++ b/tools/blktap/lib/blktaplib.h    Mon Feb 27 09:43:24 2012 +0000
> @@ -230,10 +230,10 @@ int setup_probe_watch(struct xs_handle *
> 
> /* Accessing attached data page mappings */
> #define MMAP_PAGES                                              \
> -    (MAX_PENDING_REQS * BLKIF_MAX_SEGMENTS_PER_REQUEST)
> +    (MAX_PENDING_REQS * BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK)
> #define MMAP_VADDR(_vstart,_req,_seg)                                   \
>     ((_vstart) +                                              \
> -     ((_req) * BLKIF_MAX_SEGMENTS_PER_REQUEST * getpagesize()) +    \
> +     ((_req) * BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK * getpagesize()) +    \
>      ((_seg) * getpagesize()))
> 
> 
> diff -r 0bb45a06c1a8 -r 42978617757f tools/blktap2/drivers/tapdisk-diff.c
> --- a/tools/blktap2/drivers/tapdisk-diff.c    Mon Feb 27 09:37:45 2012 +0000
> +++ b/tools/blktap2/drivers/tapdisk-diff.c    Mon Feb 27 09:43:24 2012 +0000
> @@ -429,7 +429,7 @@ tapdisk_stream_enqueue1(void)
>               breq->sector_number = sreq->sec;
>               breq->operation     = BLKIF_OP_READ;
> 
> -             for (i = 0; i < BLKIF_MAX_SEGMENTS_PER_REQUEST; i++) {
> +             for (i = 0; i < BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; i++) {
>                       uint32_t secs;
>                       struct blkif_request_segment *seg = breq->seg + i;
> 
> diff -r 0bb45a06c1a8 -r 42978617757f tools/blktap2/drivers/tapdisk-stream.c
> --- a/tools/blktap2/drivers/tapdisk-stream.c  Mon Feb 27 09:37:45 2012 +0000
> +++ b/tools/blktap2/drivers/tapdisk-stream.c  Mon Feb 27 09:43:24 2012 +0000
> @@ -296,7 +296,7 @@ tapdisk_stream_enqueue(event_id_t id, ch
>               breq->sector_number = sreq->sec;
>               breq->operation     = BLKIF_OP_READ;
> kk
> -             for (i = 0; i < BLKIF_MAX_SEGMENTS_PER_REQUEST; i++) {
> +             for (i = 0; i < BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; i++) {
>                       uint32_t secs = MIN(s->end - s->cur, psize >> 
> SECTOR_SHIFT);
>                       struct blkif_request_segment *seg = breq->seg + i;
> 
> diff -r 0bb45a06c1a8 -r 42978617757f tools/blktap2/include/blktaplib.h
> --- a/tools/blktap2/include/blktaplib.h       Mon Feb 27 09:37:45 2012 +0000
> +++ b/tools/blktap2/include/blktaplib.h       Mon Feb 27 09:43:24 2012 +0000
> @@ -222,10 +222,10 @@ typedef struct msg_lock {
> 
> /* Accessing attached data page mappings */
> #define MMAP_PAGES                                                    \
> -    (MAX_PENDING_REQS * BLKIF_MAX_SEGMENTS_PER_REQUEST)
> +    (MAX_PENDING_REQS * BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK)
> #define MMAP_VADDR(_vstart,_req,_seg)                                 \
>     ((_vstart) +                                                      \
> -     ((_req) * BLKIF_MAX_SEGMENTS_PER_REQUEST * getpagesize()) +      \
> +     ((_req) * BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK * getpagesize()) +      \
>      ((_seg) * getpagesize()))
> 
> /* Defines that are only used by library clients */
> 
> 


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.