Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-23 Thread Bharata B Rao
On Tue, May 22, 2007 at 08:35:17AM -0400, Shaya Potter wrote: > Bharata B Rao wrote: > > > >In case of regular files, when we copyup a file, we are actually preventing > >any writes to the lower layers (which we have designated as read only). > > > >Applying the same logic to devices, what do we ac

Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-22 Thread Shaya Potter
Bharata B Rao wrote: On Tue, May 22, 2007 at 08:25:16AM +0200, Jan Engelhardt wrote: On May 22 2007 08:43, Bharata B Rao wrote: 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

Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-22 Thread Bharata B Rao
On Tue, May 22, 2007 at 08:25:16AM +0200, Jan Engelhardt wrote: > > On May 22 2007 08:43, Bharata B Rao wrote: > >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 > >> >

Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-21 Thread Jan Engelhardt
On May 22 2007 08:43, Bharata B Rao wrote: >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

Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-21 Thread Bharata B Rao
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 wr

Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-18 Thread Shaya Potter
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. You should be able to change the permissions on a device node on a layer that is RO. so it would copy it up (1. mknod, 2. copy attrib

Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-18 Thread Bharata B Rao
On Wed, May 16, 2007 at 09:57:28AM +0200, Jan Engelhardt wrote: > > On May 14 2007 15:13, Bharata B Rao wrote: > >+ > >+if (flag & 0x2) { > >+error = union_copyup(nd, flag); > >+if (error) > >+goto exit; > >+} > > What I dislike (and that also g

Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-16 Thread Jan Engelhardt
On May 14 2007 15:13, Bharata B Rao wrote: >+ >+ if (flag & 0x2) { >+ error = union_copyup(nd, flag); >+ if (error) >+ goto exit; >+ } What I dislike (and that also goes for fs/namei.c and such) that they use numeral constants, i.e. 0x2. Th

[RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-14 Thread Bharata B Rao
From: Jan Blunck <[EMAIL PROTECTED]> Subject: In-kernel file copy between union mounted filesystems This patch introduces in-kernel file copy between union mounted filesystems. When a file is opened for writing but resides on a lower (thus read-only) layer of the union stack it is copied to the to