Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261719AbUCVFLv (ORCPT ); Mon, 22 Mar 2004 00:11:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261745AbUCVFLv (ORCPT ); Mon, 22 Mar 2004 00:11:51 -0500 Received: from x35.xmailserver.org ([69.30.125.51]:65408 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id S261719AbUCVFLp (ORCPT ); Mon, 22 Mar 2004 00:11:45 -0500 X-AuthUser: davidel@xmailserver.org Date: Sun, 21 Mar 2004 21:11:38 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@bigblue.dev.mdolabs.com To: "Eric W. Biederman" cc: Linux Kernel Mailing List Subject: Re: [PATCH] cowlinks v2 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1200 Lines: 32 On 21 Mar 2004, Eric W. Biederman wrote: > Davide Libenzi writes: > > > > Actually there is... You don't do the copy until an actual write occurs. > > > Some files are opened read/write when there is simply the chance they might > > > be written to so delaying the copy is generally a win. > > > > What about open+mmap? > > The case is nothing really different from having a hole in your file. > > There are two pieces to implementing this. First you create separate > page cache entries for the cow file and it's original, so the > laziness of mmapped file writes will not bite you.. Second you make > aops -> writepage trigger the actual copy of the file, and have it > return -ENOSPC if you can't do the copy. There has been a misunderstanding. I thought you were talking about a userspace solution ala fl-cow. Of course if you are inside the kernel you can catch both explicit writes and page syncs. - Davide - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/