From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valerie Aurora Subject: Re: Fallthrus as full-length symlinks? Date: Tue, 17 Nov 2009 14:47:56 -0500 Message-ID: <20091117194756.GE17822@shell> References: <62b7cf460911151915k12c57c6dne9b49399bd8ce9d5@mail.gmail.com> <62b7cf460911161657i2c9ca63cv5e4fa65b514593b@mail.gmail.com> <20091117064400.GB19996@shareable.org> <62b7cf460911170003n420bbf80h196e4dcf3e3f26f4@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jamie Lokier , linux-fsdevel@vger.kernel.org To: AYAN TYAGI Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29387 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754064AbZKQTsB (ORCPT ); Tue, 17 Nov 2009 14:48:01 -0500 Content-Disposition: inline In-Reply-To: <62b7cf460911170003n420bbf80h196e4dcf3e3f26f4@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Nov 17, 2009 at 03:03:07AM -0500, AYAN TYAGI wrote: > On Tue, Nov 17, 2009 at 1:44 AM, Jamie Lokier wrote: > > AYAN TYAGI wrote: > >> > >Another idea that I first had when reading the suggestion was to use a > >> > >symlink to self (ln -s x x) as the encoding for a fallthrough. It does > >> > >not allow renames like what you really describe, but it has another advantage > >> > >in that it does not require extensions to the upper file system layout > >> > >while not conflicting with any use case I can see. > >> > >> It seems to be a great idea to make use of self referenced symlinks . > >> Could you please describe the whole process u are proposing? > >> > >> If possible give some example and code . > > > > That'll do surprising things when the user _really_ makes a > > self-referencing symlink with "ln -s x x", which can happen > > unexpectedly, for example by untarring some archive. > > > > If a fallthrough is encoded that way, there should probably be an > > error when the user tries to make a self-referencing symlink. > > > > -- Jamie > > > > >> > The interesting thing about > > > >this idea is that it could theoretically let us rename a file from the > > > >low level file system to another place in the low-level file system > > > >without copying the contents of the file up. Basically, we can > > > >arbitrarily swizzle the namespace of the low-level by maintaining a > > > >set of symlinks above. > > So do you mean that the need of copyup in case of renaming is > virtually eliminated ? Only in the case of an unaltered file from the read-only layer being renamed to a directory that exists in the read-only layer as well. I suspect this is not a common case, and most rename()s occur on newly created files. -VAL