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

[Xen-changelog] fast_flush_area() should index the unmap request array using



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 19e5385bc5b3a4fd147c85e95875d62a644d8515
# Parent  1f57d567cf4b4d7d7f53bf2bb8bb11168840298b
fast_flush_area() should index the unmap request array using
invcount, not i. Also, fix initialisation of pending_grant_handles:
it was happening too late, and the use of memset() was bogus.

Signed-off-by: Harry Butterworth <butterwo@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 1f57d567cf4b -r 19e5385bc5b3 
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Mon Nov  7 
11:05:15 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Mon Nov  7 
11:52:49 2005
@@ -114,10 +114,10 @@
                handle = pending_handle(idx, i);
                if (handle == BLKBACK_INVALID_HANDLE)
                        continue;
-               unmap[i].host_addr      = MMAP_VADDR(idx, i);
-               unmap[i].dev_bus_addr   = 0;
-               unmap[i].handle         = handle;
-               pending_handle(idx, i)  = BLKBACK_INVALID_HANDLE;
+               unmap[invcount].host_addr    = MMAP_VADDR(idx, i);
+               unmap[invcount].dev_bus_addr = 0;
+               unmap[invcount].handle       = handle;
+               pending_handle(idx, i) = BLKBACK_INVALID_HANDLE;
                invcount++;
        }
 
@@ -498,6 +498,9 @@
        struct page *page;
        int ret;
 
+       for (i = 0; i < MMAP_PAGES; i++)
+               pending_grant_handles[i] = BLKBACK_INVALID_HANDLE;
+
        blkif_interface_init();
 
        page = balloon_alloc_empty_page_range(MMAP_PAGES);
@@ -518,8 +521,6 @@
 
        blkif_xenbus_init();
 
-       memset(pending_grant_handles,  BLKBACK_INVALID_HANDLE, MMAP_PAGES);
-
        return 0;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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