From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bharata B Rao Subject: Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems Date: Tue, 22 May 2007 08:43:27 +0530 Message-ID: <20070522031327.GA4728@in.ibm.com> References: <20070514093722.GB4139@in.ibm.com> <20070514094329.GL4139@in.ibm.com> <20070518111042.GC4869@in.ibm.com> <464DAE73.7000302@cs.columbia.edu> Reply-To: bharata@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Engelhardt , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jan Blunck To: Shaya Potter Return-path: Received: from e36.co.us.ibm.com ([32.97.110.154]:37501 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755038AbXEVDHm (ORCPT ); Mon, 21 May 2007 23:07:42 -0400 Content-Disposition: inline In-Reply-To: <464DAE73.7000302@cs.columbia.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, May 18, 2007 at 09:47:31AM -0400, Shaya Potter wrote: > Bharata B Rao wrote: > > > > >Not really. This is called during copyup of a file residing in a lower > >layer. And that is done only for regular files. > > That is broken. But it only breaks the semantics (in other cases we allow writes only to the top layer files). So the question is why do we have to copy up the device node ? What difference it makes to writing to the device itself ? Currently we allow write to the device using the lower layer device node itself. > > You should be able to change the permissions on a device node on a layer > that is RO. > Hmm not sure why we need to touch the permissions of the device. See below. > so it would copy it up (1. mknod, 2. copy attributes) and then the > appropriate attribute notification change would be called. With union mount, when a regular file is opened for write, it is checked if it resides in the lower layer and if so copied up to the topmost layer and this new fd is returned from open. And any subsequent writes using this fd will go to the newly created topmost file. (We are aware that we are not yet copying the (extended) attributes to the newly created topmost file, which we have to do). Regards, Bharata.