From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-id: <558983D3.3040205@samsung.com> Date: Tue, 23 Jun 2015 18:05:39 +0200 From: Jan Olszak MIME-version: 1.0 Subject: Re: Optional switching off cow in overlayfs References: <55893699.6090109@samsung.com> <55882AA5.10908@samsung.com> <5582C6C1.8080602@samsung.com> <13405.1434634748@warthog.procyon.org.uk> <5582D8F7.1060700@samsung.com> <5588116E.20509@samsung.com> <55881B2A.7090106@samsung.com> <29219.1435051659@warthog.procyon.org.uk> <32715.1435065828@warthog.procyon.org.uk> In-reply-to: <32715.1435065828@warthog.procyon.org.uk> Content-type: multipart/alternative; boundary=------------050006000408080707090103 To: David Howells Cc: Miklos Szeredi , "linux-unionfs@vger.kernel.org" List-ID: This is a multi-part message in MIME format. --------------050006000408080707090103 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 06/23/2015 03:23 PM, David Howells wrote: > Jan Olszak wrote: > >> Why not just say: "rename causes copy" and leave everything as it is now. > That's another option - but your whole proposal was that we specifically don't > copy up these files IIRC. Yes, so let's modify the proposal: Overlayfs checks xattr "trusted.overlay.cow" to switch COW off whenever it's possible. 1. This would be an optimization/convenience option, not a sercurity option. 2. By default overlayfs uses COW like it does now 3. trusted.overlay.cow=="n" means: 1. Unlink, open, setattr etc. use the original inode from lowerdir 2. Unmodifying operations also use inode from lowerdir 3. Other operations (rename) may copy the file if it's required by the implementation of overlayfs Thanks, Jan --------------050006000408080707090103 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit On 06/23/2015 03:23 PM, David Howells wrote:
Jan Olszak <j.olszak@samsung.com> wrote:

Why not just say: "rename causes copy" and leave everything as it is now.
That's another option - but your whole proposal was that we specifically don't
copy up these files IIRC.
Yes, so let's modify the proposal:

Overlayfs checks xattr "trusted.overlay.cow" to switch COW off whenever it's possible.

  1. This would be an optimization/convenience option, not a sercurity option.
  2. By default overlayfs uses COW like it does now
  3. trusted.overlay.cow=="n" means:
    1. Unlink, open, setattr etc. use the original inode from lowerdir
    2. Unmodifying operations also use inode from lowerdir
    3. Other operations (rename) may copy the file if it's required by the implementation of overlayfs

Thanks,
Jan
--------------050006000408080707090103--