Commit 25e73a23 authored by kaf24's avatar kaf24

Here are another couple of places where 8 sectors/page is assumed,

which I missed in my first patch.
Signed-off-by: default avatarMatthew Chapman <matthewc@hp.com>
parent 82f2f3c9
......@@ -379,7 +379,7 @@ static void dispatch_probe(blkif_t *blkif, blkif_request_t *req)
/* 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
......
......@@ -775,7 +775,7 @@ static int blkif_queue_request(unsigned long id,
/* 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;
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment