Skip to contentSkip to conversation

trivial blkif fix

PATCH New Matt Chapman 1 participant 1 message Aug 4, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trivial blkif fix

Here are another couple of places where 8 sectors/page is assumed, which I missed in my first patch.

Matt

linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c +1 -1
diff -r 60c4cd9ebaa1 linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
@@ -379,7 +379,7 @@
 
     /* Make sure the buffer is page-sized. */
     if ( (blkif_first_sect(req->frame_and_sects[0]) != 0) ||
-         (blkif_last_sect(req->frame_and_sects[0]) != 7) )
+         (blkif_last_sect(req->frame_and_sects[0]) != ((PAGE_SIZE/512)-1)) )
         goto out;
 
 #ifdef CONFIG_XEN_BLKDEV_GRANT
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +1 -1
diff -r 60c4cd9ebaa1 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
@@ -775,7 +775,7 @@
     /* Buffer must be sector-aligned. Extent mustn't cross a page boundary. */
     if ( unlikely((buffer_ma & ((1<<9)-1)) != 0) )
         BUG();
-    if ( lsect > 7 )
+    if ( lsect > ((PAGE_SIZE/512)-1) )
         BUG();
 
     buffer_ma &= PAGE_MASK;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel