From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH][RFC] fast file mapping for loop Date: Wed, 9 Jan 2008 09:31:07 +0000 Message-ID: <20080109093107.GA5023@infradead.org> References: <20080109085231.GE6650@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, chris.mason@oracle.com, linux-fsdevel@vger.kernel.org, Peter Zijlstra To: Jens Axboe Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:44235 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbYAIJbU (ORCPT ); Wed, 9 Jan 2008 04:31:20 -0500 Content-Disposition: inline In-Reply-To: <20080109085231.GE6650@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jan 09, 2008 at 09:52:32AM +0100, Jens Axboe wrote: > - The file block mappings must not change while loop is using the file. > This means that we have to ensure exclusive access to the file and > this is the bit that is currently missing in the implementation. It > would be nice if we could just do this via open(), ideas welcome... And the way this is done is simply broken. It means you have to get rid of things like delayed or unwritten hands beforehand, it'll be a complete pain for COW or non-block backed filesystems. The right way to do this is to allow direct I/O from kernel sources where the filesystem is in-charge of submitting the actual I/O after the pages are handed to it. I think Peter Zijlstra has been looking into something like that for swap over nfs.