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-devel

[Xen-devel] question about GET_ID_FROM_FREELIST function in blkfront

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] question about GET_ID_FROM_FREELIST function in blkfront
From: "Lily Huang" <ushuanglily@xxxxxxxxx>
Date: Thu, 11 May 2006 13:46:28 -0400
Delivery-date: Thu, 11 May 2006 10:53:40 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=P5PK7Nt22ihzjB9y6fwRPc6+pWJks9l+USUzI+dbqQrNER+QiMGOWKbKLBpaCmjpf1XdtcdHWdiSwzDk1XdIhwQbaxqUTAm7kt86TabcijA3hmmmfVPfB8HE2cyFNb6ItBDBVdyP73qK5+QpbNepgelab4srt2Ay6ElX8Nr3MzE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I noticed that the last element of freelist is initialized to be 0x0fffffff with the code below
---info->shadow[BLK_RING_SIZE-1].req.id = 0x0fffffff;

This means the last element points to an invalid slot.

But question is: if the last element is allocated, info->shadow_free will be this invalid slot 0x0fffffff, which may trigger the
bug checking code  "BUG_ON(free > BLK_RING_SIZE);"

How to avoid this? Is this a reasonable design?

Thanks,
-l

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] question about GET_ID_FROM_FREELIST function in blkfront, Lily Huang <=