linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaya Potter <spotter@cs.columbia.edu>
To: bharata@linux.vnet.ibm.com
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Jan Blunck <j.blunck@tu-harburg.de>
Subject: Re: [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems
Date: Tue, 22 May 2007 08:35:17 -0400	[thread overview]
Message-ID: <4652E385.30803@cs.columbia.edu> (raw)
In-Reply-To: <20070522083826.GD4728@in.ibm.com>

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 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 ?
>> Because `chmod 666 blockdevnode` is not the same as writing
>> to the device itself?
> 
> What if that chmod is applied on the lower level device node ? This is what
> we do currently, even for regular files. Copyup happens only when the file
> is opened for writing.
> 
> Let me rephrase my earlier question:
> 
> 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 achieve by copying them up ?
> How does it matter if we write to the device through a node in the upper
> layer or in the lower layer. Both the writes eventually do the same thing.

What happens if the lower layer is on a read only medium.  But the top 
layer is RW.  Why can't one change permissions?  In your model, one can't.

What happens if one wants to share a lower layer read-only (I'm doing 
this with my research into uses of union file systems), one doesn't want 
permission change in one use of the lower layer to affect any of the 
other uses.


> What I am trying to understand is, if the need for copyup is purely a matter
> of conforming to semantics (of not allowing writes to the lower layers in
> case of union mount) or do we achieve anything else by doing a device
> copyup ? Are there any cases where copying up of device nodes are absolutely
> essential for sane behaviour ?

If the lower layer is relatively immutable (ignoring atime) it can be 
shared in a RO manner by multiple unions.  If it's not, it can't be. 
Also, copyup is needed in general as the RO union layer can be on a RO 
file system but the union will not be RO.

  reply	other threads:[~2007-05-22 12:46 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14  9:37 [RFC][PATCH 0/14] VFS based Union Mount(v1) Bharata B Rao
2007-05-14  9:38 ` [RFC][PATCH 1/14] Add union mount documentation Bharata B Rao
2007-05-14  9:39 ` [RFC][PATCH 2/14] Add a new mount flag (MNT_UNION) for union mount Bharata B Rao
2007-05-14 20:38   ` Jan Engelhardt
2007-05-15  8:16     ` Bharata B Rao
2007-05-15 12:06       ` Eric Van Hensbergen
2007-05-15 12:53         ` Jan Blunck
2007-05-14  9:39 ` [RFC][PATCH 3/14] Add the whiteout file type Bharata B Rao
2007-05-14 20:39   ` Jan Engelhardt
2007-05-15  6:00     ` Jan Blunck
2007-05-14  9:40 ` [RFC][PATCH 4/14] Add config options for union mount Bharata B Rao
2007-05-14  9:40 ` [RFC][PATCH 5/14] Introduce union stack Bharata B Rao
2007-05-14 20:23   ` Badari Pulavarty
2007-05-14 20:51     ` Jan Engelhardt
2007-05-19 10:18     ` Paul Dickson
2007-05-22 16:35       ` Jan Engelhardt
2007-05-23 13:25       ` Serge E. Hallyn
2007-05-14 20:48   ` Jan Engelhardt
2007-05-15  7:19     ` Jan Blunck
2007-05-14 22:40   ` Badari Pulavarty
2007-05-15  6:28     ` Bharata B Rao
2007-05-14  9:41 ` [RFC][PATCH 6/14] Union-mount dentry reference counting Bharata B Rao
2007-05-14 20:57   ` Jan Engelhardt
2007-05-14  9:41 ` [RFC][PATCH 7/14] Union-mount mounting Bharata B Rao
2007-05-15  7:29   ` Jan Engelhardt
2007-05-16  5:04     ` Bharata B Rao
2007-05-14  9:42 ` [RFC][PATCH 8/14] Union-mount lookup Bharata B Rao
2007-05-15  7:57   ` Jan Engelhardt
2007-05-16  5:08     ` Bharata B Rao
2007-05-16 19:28       ` Jan Engelhardt
2007-05-16 20:06         ` Serge E. Hallyn
2007-05-15 14:00   ` Trond Myklebust
2007-05-18 11:05     ` Bharata B Rao
2007-05-14  9:42 ` [RFC][PATCH 9/14] Union-mount readdir Bharata B Rao
2007-05-14 10:43   ` Carsten Otte
2007-05-14 11:15     ` Bharata B Rao
2007-05-14  9:43 ` [RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems Bharata B Rao
2007-05-16  7:57   ` Jan Engelhardt
2007-05-18 11:10     ` Bharata B Rao
2007-05-18 13:47       ` Shaya Potter
2007-05-22  3:13         ` Bharata B Rao
2007-05-22  6:25           ` Jan Engelhardt
2007-05-22  8:38             ` Bharata B Rao
2007-05-22 12:35               ` Shaya Potter [this message]
2007-05-23 10:41                 ` Bharata B Rao
2007-05-14  9:43 ` [RFC][PATCH 11/14] VFS whiteout handling Bharata B Rao
2007-05-16  8:06   ` Jan Engelhardt
2007-05-14  9:44 ` [RFC][PATCH 12/14] ext2 whiteout support Bharata B Rao
2007-05-16  8:07   ` Jan Engelhardt
2007-05-14  9:44 ` [RFC][PATCH 13/14] ext3 " Bharata B Rao
2007-05-14 20:16   ` Badari Pulavarty
2007-05-15  6:26     ` Bharata B Rao
2007-05-15  8:31       ` Jan Blunck
2007-05-14 20:17   ` Andreas Dilger
2007-05-14 20:35     ` Jan Blunck
2007-05-15 14:28       ` Theodore Tso
2007-05-14  9:45 ` [RFC][PATCH 14/14] tmpfs " Bharata B Rao
2007-05-14 16:13   ` Hugh Dickins
2007-05-14 19:20     ` Jan Blunck
2007-05-14 19:35       ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4652E385.30803@cs.columbia.edu \
    --to=spotter@cs.columbia.edu \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=j.blunck@tu-harburg.de \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).