From: Matt Chapman Subject: [PATCH] trivial blkif fix Date: Wed, 3 Aug 2005 18:04:43 -0600 Message-ID: <20050804000443.GA7988@kirby.fc.hp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="hHWLQfXTYDoKhP50" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --hHWLQfXTYDoKhP50 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here are another couple of places where 8 sectors/page is assumed, which I missed in my first patch. Matt Signed-off-by: Matthew Chapman --hHWLQfXTYDoKhP50 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="blk3.diff" diff -r 60c4cd9ebaa1 linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c Wed Aug 3 16:11:32 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c Wed Aug 3 15:16:00 2005 @@ -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 diff -r 60c4cd9ebaa1 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Aug 3 16:11:32 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Aug 3 15:16:00 2005 @@ -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; --hHWLQfXTYDoKhP50 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --hHWLQfXTYDoKhP50--