From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: error during umuont after set-default with 2.6.34-rc2 Date: Mon, 22 Mar 2010 09:38:58 -0400 Message-ID: <20100322133858.GB32521@think> References: <201003212045.o2LKjBgg002162@indigo.cs.bgu.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-btrfs@vger.kernel.org To: Alexander Piavlo Return-path: In-Reply-To: <201003212045.o2LKjBgg002162@indigo.cs.bgu.ac.il> List-ID: On Sun, Mar 21, 2010 at 10:45:11PM +0200, Alexander Piavlo wrote: > Hi, > trying the new btrfs tool and set-default with 2.6.34-rc2 i hit the the > following problem: > > mkfs.btrfs -d single /dev/sys/btrfs > mount -t btrfs /dev/sys/btrfs /btrfs > btrfs subvolume create /btrfs/newroot > mkdir /btrfs/newroot/.btrfs > btrfs subvolume set-default 256 /btrfs > umount /btrfs > mount -t btrfs /dev/sys/btrfs /btrfs > > up till now everything works ok > > A question How do i access or mount the original root of btrfs? Which > tree id does it have? > It would be great if "btrfs subvolume list ..." would also list the > original root. > > I guessed I need to use 0, so i tried: > mount -t btrfs -o subvol=0 /dev/sys/btrfs /btrfs/.btrfs > and: > mount -t btrfs -o subvol=. /dev/sys/btrfs /btrfs/.btrfs > but in both cases it mounted the newroot subvolume with id 256 under > /btrfs/.btrfs > > So I tried setting the original root back with: > btrfs subvolume set-default 0 /btrfs Looks like set-default needs to understand 0 means use the old default, I'll add this in. btrfs subvolume set-default 5 /btrfs or mount -o subvolid=0 /dev/xxx /mnt or mount -o subvolid=5 /dev/xxx /mnt -chris