Re: add subvolume when / is not mounted?

2010-05-13 Thread Josef Bacik
On Thu, May 13, 2010 at 08:19:21PM +0200, Andreas Philipp wrote: > Hi, > > Well, I do not know if here is the right place to ask questions like > this one so please tell me if it is not. > The situation is the following: btrfs (data and metadata single) on > /dev/sda3 (size 100GB) with two subvolu

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Josef Bacik
On Thu, May 13, 2010 at 11:11:36AM -0700, Andrew Morton wrote: > On Thu, 13 May 2010 14:01:37 -0400 > Josef Bacik wrote: > > > On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote: > > > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > > > > AIO's aio_complete does kmap

add subvolume when / is not mounted?

2010-05-13 Thread Andreas Philipp
Hi, Well, I do not know if here is the right place to ask questions like this one so please tell me if it is not. The situation is the following: btrfs (data and metadata single) on /dev/sda3 (size 100GB) with two subvolumes /one and /two. Both subvolumes are mounted to /mnt/one resp. /mnt/two. Is

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Andrew Morton
On Thu, 13 May 2010 14:01:37 -0400 Josef Bacik wrote: > On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote: > > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > > > AIO's aio_complete does kmap with KM_IRQ0/1 and it gets called in the same > > > context as the btrfs c

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Josef Bacik
On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote: > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > > AIO's aio_complete does kmap with KM_IRQ0/1 and it gets called in the same > > context as the btrfs completion handler, so if it's ok for aio_complete it > > should

Re: OOPS when subvol=xxx where xxx does not exist

2010-05-13 Thread Josef Bacik
On Thu, May 13, 2010 at 07:24:48PM +0800, Victor Roetman wrote: > I am running 2.6.34-rc5, testing was done with a 4G thumb drive. > > # mkfs.btrfs /dev/sdd1 > > WARNING! - Btrfs v0.19-16-g075587c IS EXPERIMENTAL > WARNING! - see http://btrfs.wiki.kernel.org before using > > fs created label (nu

[PATCH] Btrfs: fix error handling in btrfs_get_sb

2010-05-13 Thread Josef Bacik
If we failed to find the root subvol id, or the subvol=, we would deactivate the locked super and close the devices. The problem is at this point we have gotten the SB all setup, which includes setting super_operations, so when we'd deactiveate the super, we'd do a close_ctree() which closes the d

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Andrew Morton
On Thu, 13 May 2010 11:31:45 -0400 Josef Bacik wrote: > On Thu, May 13, 2010 at 11:14:30AM -0400, Christoph Hellwig wrote: > > On Wed, May 12, 2010 at 04:40:53PM -0400, Josef Bacik wrote: > > > V1->V2 > > > -Use __blockdev_direct_IO instead of helper > > > -Use KM_IRQ0 for kmap instead of KM_USER

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Josef Bacik
On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote: > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > > AIO's aio_complete does kmap with KM_IRQ0/1 and it gets called in the same > > context as the btrfs completion handler, so if it's ok for aio_complete it > > should

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Christoph Hellwig
On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > AIO's aio_complete does kmap with KM_IRQ0/1 and it gets called in the same > context as the btrfs completion handler, so if it's ok for aio_complete it > should be ok for btrfs right? Thanks, aio_complete does a spin_lock_irqsave befo

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Josef Bacik
On Thu, May 13, 2010 at 11:14:30AM -0400, Christoph Hellwig wrote: > On Wed, May 12, 2010 at 04:40:53PM -0400, Josef Bacik wrote: > > V1->V2 > > -Use __blockdev_direct_IO instead of helper > > -Use KM_IRQ0 for kmap instead of KM_USER0 > > I still don't think this is correct. The completion can co

Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3

2010-05-13 Thread Christoph Hellwig
On Wed, May 12, 2010 at 04:40:53PM -0400, Josef Bacik wrote: > V1->V2 > -Use __blockdev_direct_IO instead of helper > -Use KM_IRQ0 for kmap instead of KM_USER0 I still don't think this is correct. The completion can come from softirq and hardirq context, and possibly even normal process context.

OOPS when subvol=xxx where xxx does not exist

2010-05-13 Thread Victor Roetman
I am running 2.6.34-rc5, testing was done with a 4G thumb drive. # mkfs.btrfs /dev/sdd1 WARNING! - Btrfs v0.19-16-g075587c IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using fs created label (null) on /dev/sdd1 nodesize 4096 leafsize 4096 sectorsize 4096 size 3.73GB