From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaya Potter Subject: Re: fistgen-0.1.1 released (linux-2.6 support) Date: Tue, 03 Aug 2004 08:05:49 -0700 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1091545549.13119.10.camel@localhost.localdomain> References: <20040731195717.GA24760@mail.shareable.org> <200408021818.i72IIpoP003176@agora.fsl.cs.sunysb.edu> <20040802190817.GA11754@mail.shareable.org> <1091498050.7483.8.camel@localhost.localdomain> <1091536950.21607.5.camel@polarbear.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from opus.cs.columbia.edu ([128.59.20.100]:10630 "EHLO opus.cs.columbia.edu") by vger.kernel.org with ESMTP id S266633AbUHCPGM (ORCPT ); Tue, 3 Aug 2004 11:06:12 -0400 To: "Charles P. Wright" In-Reply-To: <1091536950.21607.5.camel@polarbear.fsl.cs.sunysb.edu> List-Id: linux-fsdevel.vger.kernel.org On Tue, 2004-08-03 at 08:42 -0400, Charles P. Wright wrote: > On Mon, 2004-08-02 at 21:54, Shaya Potter wrote: > > > One uses it by typing "cp -a dir1 dir2" or "cp -r dir1 dir2". > > > > > > That's all. There are no user-visible versions, no branch > > > management, and no other commands. > > > > I have a "working" (relative term as performance sucks) fs that can do > > that. It combined a file system based out of fist's templates and a bit > > of hacking on ext3cow. > > > > basic idea is that ext3cow provided the individual file versioning > > semantic (and directories are just treated as containers) while the > > stackable fs managed the branching (and deciding when to version and the > > like). > > > > was able to build 4 kernels side by side w/o a problem. > > > > i.e. it was something along the lines of (from memory) > > > > # mkfs.ext3cow /dev/loop0 > > # mount -t ext3cow /dev/loop0 /mnt > > # mount -o bind /mnt /mnt1 > > # mount -o bind /mnt /mnt2 > > # mount -o bind /mnt /mnt3 > > # (cd /mnt ; tar xzf ~/linux.tar.gz) > > # mount -t branchfs -o new_branch=new,old_branch=,(some fist > > options) /mnt /mnt > > # cd /mnt > > # branch_ioctl new1 > > # mount -t branchfs -o new_branch=new2,old_branch=new,(some fist > > options) /mnt1 /mnt1 > > # mount -t branchfs -o new_branch=new2,old_branch=new,(some fist > > options) /mnt2 /mnt2 > > # mount -t branchfs -o new_branch=new2,old_branch=new,(some fist > > options) /mnt2 /mnt2 > > > > lots of issues w/ it, but it was able to do the above as (well as then > > build the kernels). > > > Shaya, > > What does that sequence of commands actually mean? ahh good point. let comments it. (and reorganize to make clearer, and fix a stupid bug at the end) # create the underlying buffer store $ mkfs.ext3cow /dev/loop0 # mount the underling buffer store to initial place $ mount -t ext3cow /dev/loop0 /mnt # mount the underlying buffer store to places you want to branch $ mount -o bind /mnt /mnt1 $ mount -o bind /mnt /mnt2 $ mount -o bind /mnt /mnt3 # create initial branch on the empty fs. call it "new" $ mount -t branchfs -o new_branch=new,old_branch=,(some fist options) /mnt /mnt #untar the linux kernel (it's now available $ (cd /mnt ; tar xzf ~/linux.tar.gz) # branch the fs from branch "new" to "new1 (i.e. branch_ioctl takes a string that says what to create the new branch. $ cd /mnt $ branch_ioctl new1 // create 3 new branches based on branch "new" $ mount -t branchfs -o new_branch=new2,old_branch=new,(some fist options) /mnt1 /mnt1 $ mount -t branchfs -o new_branch=new3,old_branch=new,(some fist options) /mnt2 /mnt2 $ mount -t branchfs -o new_branch=new4,old_branch=new,(some fist options) /mnt2 /mnt2 one can now go into /mnt (branch "new1") /mnt1 (branch "new2") /mnt2 (branch "new3") and /mnt3 (branch "new4") which each share a common linux source tree, but can be configured (files added) and compiled (filed added and deleted) and edited (files bits are modified) completely independently of each other. Whenever we need to version a file, I hacked ext3cow's "COW" functionality to provide a "cowpy" function that let you essentially mimic link(), but create a "cow" link instead.