[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] question about GET_ID_FROM_FREELIST function in blkfront


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.