From: Andi Kleen Subject: Re: [PATCH][RFC] fast file mapping for loop Date: Wed, 09 Jan 2008 16:34:23 +0100 Message-ID: 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 To: Jens Axboe Return-path: Received: from ns2.suse.de ([195.135.220.15]:39775 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbYAIPeZ (ORCPT ); Wed, 9 Jan 2008 10:34:25 -0500 In-Reply-To: <20080109085231.GE6650@kernel.dk> (Jens Axboe's message of "Wed\, 9 Jan 2008 09\:52\:32 +0100") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jens Axboe writes: > > So how does it work? Instead of punting IO to a thread and passing it > through the page cache, we instead attempt to send the IO directly to the Great -- something like this was needed for a long time. > - 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... get_write_access()/put_write_access() will block other writers. But as pointed out by others that is not enough for this. I suppose you could use a white list like a special flag for file systems (like ext2/ext3) that do not reallocate blocks. -Andi