From: Keir Fraser Subject: Re: Problem with PV disk and iSCSI Date: Sat, 09 Feb 2008 08:07:34 +0000 Message-ID: References: <20080209061547.GB14510@ca-server1.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080209061547.GB14510@ca-server1.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kurt Hackel , Gary Grebus Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 9/2/08 06:15, "Kurt Hackel" wrote: >> I'm thinking blkback will have to make a dom0 copy of the page before >> doing the unmap if there are still extra references? > > Can the unmap be deferred, handled by the last reference holder? Or > does this open up a potential security hole? netback already does this kind of reference counting. It oughtn't to be hard to check the page reference count in the blkback I/O completion handler and, if non-zero, set up a callback for when the count does fall to zero. And defer responding to the frontend until that time. Netback is even more sophisticated in that it also sets a time out and if the page languishes for too long with non-zero count, it's able to forcibly copy-and-release the page. I don't think we need to go that far for blkback however. -- Keir