From: Keir Fraser Subject: Re: building blktap as a module Date: Mon, 16 Oct 2006 13:56:54 +0100 Message-ID: References: <453370DB.8090902@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <453370DB.8090902@suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Hoffmann Cc: Andrew Warfield , xen-devel@lists.xensource.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org On 16/10/06 12:45, "Gerd Hoffmann" wrote: >> 1. The one in blktap_release() - why? Standard semantics is for mmap >> regions to exist beyond the closing of the mapping device. Doesn't make much >> sense to do that here, but then again not really any need to explicitly >> disallow it (and add extra code to enforce). > > The linux kernel does call the drivers release() method when the last > reference is gone. If you call close() with mappings still being > active, then ->release() is _not_ called when you close the file handle > but when the last mapping is unmapped. Thus there is no point in trying > to handle active mappings there ;) I.e., they'll have been unmapped already? As you say, either way the zap is not needed... -- Keir