From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. R. Okajima" Subject: Re: [PATCH 16/35] union-mount: Writable overlays/union mounts documentation Date: Fri, 30 Apr 2010 01:10:16 +0900 Message-ID: <3051.1272557416@jrobl> References: <1271372682-21225-9-git-send-email-vaurora@redhat.com> <1271372682-21225-10-git-send-email-vaurora@redhat.com> <1271372682-21225-11-git-send-email-vaurora@redhat.com> <1271372682-21225-12-git-send-email-vaurora@redhat.com> <1271372682-21225-13-git-send-email-vaurora@redhat.com> <1271372682-21225-14-git-send-email-vaurora@redhat.com> <1271372682-21225-15-git-send-email-vaurora@redhat.com> <1271372682-21225-16-git-send-email-vaurora@redhat.com> <1271372682-21225-17-git-send-email-vaurora@redhat.com> <20100428201908.GC16691@shell> Cc: Miklos Szeredi , viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Valerie Aurora Return-path: In-Reply-To: <20100428201908.GC16691@shell> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Valerie Aurora: > One of the major difficulties that arises even when doing unioning at > the VFS level is keeping around the parent's path in order to do the > copyup later on. Take a look at the code pattern in the "union-mount: > Implement union-aware syscall()" series of patches. That's the > prettiest and most efficient version I could come up with, after two > other implementations, and it's in the VFS, at the vfs_foo_syscall() > level. I don't even know how I would start if I had to wait until the > file system op is called. I agree that is prettiest, and copup at open for write makes it easier. But some applications issue mmap(MAP_PRIVATE) after open(O_RDWR), for example modprobe(8). In this case, every kernel module will be copied-up and it must be a waste of time and space. And I guess this is one reason why other implementation took the approach of copyup at write. At the same time, I guess this issue may be less important since other parts are pretty enough. J. R. Okajima