WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] fast_flush_area() should index the unmap request array using
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 07 Nov 2005 13:08:11 +0000
Delivery-date: Mon, 07 Nov 2005 13:09:01 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] fast_flush_area() should index the unmap request array using, Xen patchbot -unstable <=