From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jordi Pujol Subject: Re: overlayfs: mounting overlayfs on top of overlayfs Date: Fri, 10 Jun 2011 08:46:52 +0200 Message-ID: <201106100846.52488.jordipujolp@gmail.com> References: <201106031529.30103.jordipujolp@gmail.com> <201106071500.26226.jordipujolp@gmail.com> <87ipsgcqhm.fsf@tucsk.pomaz.szeredi.hu> Mime-Version: 1.0 Content-Type: Text/Plain; charset="ibm874" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, Michal Suchanek To: Miklos Szeredi Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:42302 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340Ab1FJGrA (ORCPT ); Fri, 10 Jun 2011 02:47:00 -0400 Received: by wya21 with SMTP id 21so1630511wya.19 for ; Thu, 09 Jun 2011 23:46:56 -0700 (PDT) In-Reply-To: <87ipsgcqhm.fsf@tucsk.pomaz.szeredi.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello, Here are my comments about this patch: I think "append" should also be prohibited in a read-only fs. if (mask & (MAY_WRITE | MAY_APPEND)) About the readonly modification on the main filisystem mount, before this modification overlayfs already emited a warning message when mounting using a read only upperdir. Following is an old log: + COW_DIR=/tmp/TEST-sz5/COW-Mec + mount -t tmpfs -o ro tmpfs /tmp/TEST-sz5/COW-Mec + mount -t overlayfs -o rw,lowerdir=/tmp/TEST-sz5/ROOT-RO- kei,upperdir=/tmp/TEST-sz5/COW-Mec overlayfs /tmp/TEST-sz5/ROOT-S1M mount: block device overlayfs is write-protected, mounting read-only (warning, return code 0) + mount -o remount,rw /tmp/TEST-sz5/ROOT-S1M mount: cannot remount block device overlayfs read-write, is write-protected (error, rc 32) + mount -l overlayfs on /tmp/TEST-sz5/ROOT-S1M type overlayfs (ro, but now, after appliying the last patch, the behaviour is very confused: - there is no warning message when mounting overlayfs rw on a ro upperdir - /proc/mounts shows overlayfs as a rw fs while really it is ro + mount -l ... tmpfs on /tmp/TEST-Eo7/COW-uYW type tmpfs (ro) overlayfs on /tmp/TEST-Eo7/ROOT-dAb type overlayfs (rw,lowerdir=/tmp/TEST- Eo7/ROOT-RO-TfK,upperdir=/tmp/TEST-Eo7/ROOT-RO-TfK,upperdir=/tmp/TEST-Eo7/COW- uYW) + mount -o remount,rw /tmp/TEST-Eo7/ROOT-dAb mount: cannot remount block device overlayfs read-write, is write-protected Sincerely, the previous behaviour was better, Thanks, Jordi Pujol Live never ending Tale GNU/Linux Live forever! http://livenet.selfip.com