From owner-freebsd-fs Thu Apr 26 16:49: 5 2001 Delivered-To: freebsd-fs@freebsd.org Received: from sheffield.cnchost.com (sheffield.concentric.net [207.155.252.12]) by hub.freebsd.org (Postfix) with ESMTP id E1A6837B423 for ; Thu, 26 Apr 2001 16:49:02 -0700 (PDT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by sheffield.cnchost.com id TAA10209; Thu, 26 Apr 2001 19:48:56 -0400 (EDT) [ConcentricHost SMTP Relay 1.11] Message-ID: <200104262348.TAA10209@sheffield.cnchost.com> To: Terry Lambert Cc: fs@FreeBSD.ORG, bakul@FreeBSD.ORG Subject: Re: versioned files via snapshot evilness. In-Reply-To: Your message of "Thu, 26 Apr 2001 22:57:59 -0000." <200104262258.PAA09326@usr06.primenet.com> Date: Thu, 26 Apr 2001 16:48:56 -0700 From: Bakul Shah Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > > Versioning ala VMS requires kernel globbing, or amazingly > > > intrusive library modifications, coupled with a guarantee > > > by programmers that they will only use the preferred APIs > > > in their applications. > > > > Well... you can do this by treating each file as a directory, > > This is the folded namespace approach. In the user's "view" > onto the filesystem, they would see only the "file" name, and > when they reference the file, they get the most recent version in the directory. Likely my example was not clear. The user gets both views: as a file and a dir, depending on the open mode. For example, as a file when you do open("foo",...) and as a dir when you do open("foo/", ...). Either a trailing slash or with an open mode or something to select between the two. If you want the latest HEAD version you open "foo". If you want a specific version 1.2, you open "foo/1/2". Should there be further branching 1.2.{1,2,..n}, opening "foo/1/2" will automatically give you the latest sub version. So this scheme extends very nicely to a tree of versions as opposed to the '; ' scheme which is flat. > You still need a seperate handler for the namespace escape to do > the version redirection of the name, or to select the most recent > version, if no escape is present. This still leaves you hanging > out to try over listing all version of the file from the user's > point of view, as VMS did, without a ";" namespace > intrusion (as opposed to an escape). What is wrong with `ls -R foo' if you want to list every created version and `ls foo/1/2/*' if you want to list all the same level sub versions of 1.2? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message