Re: [PATCH V2] Btrfs: fix subvolume mount by name problem when default mount subvolume is set

2011-04-05 Thread Li Zefan
13:27, Zhong, Xin wrote: > We create two subvolumes (meego_root and meego_home) in > btrfs root directory. And set meego_root as default mount > subvolume. After we remount btrfs, meego_root is mounted > to top directory by default. Then when we try to mount > meego_home (subvol=meego_home) to a su

[PATCH V2] Btrfs: fix subvolume mount by name problem when default mount subvolume is set

2011-04-05 Thread Zhong, Xin
We create two subvolumes (meego_root and meego_home) in btrfs root directory. And set meego_root as default mount subvolume. After we remount btrfs, meego_root is mounted to top directory by default. Then when we try to mount meego_home (subvol=meego_home) to a subdirectory, it failed. The problem

RE: [PATCH] Btrfs: fix subvolume mount by name problem when default mount subvolume is set

2011-04-05 Thread Zhong, Xin
> -Original Message- > From: Chris Mason [mailto:chris.ma...@oracle.com] > Sent: Tuesday, April 05, 2011 1:07 PM > To: Zhong, Xin > Cc: linux-btrfs > Subject: Re: [PATCH] Btrfs: fix subvolume mount by name problem when > default mount subvolume is set > > Excerpts from Zhong, Xin's message

Re: cloning single-device btrfs file system onto multi-device one

2011-04-05 Thread Evert Vorster
Hi there. >From my limited understanding, btrfs will write metadata in raid1 by default. So, this could be where your 2TB has gone. I am assuming you used raid0 for the three new disks? Also, hard-stopping a btrfs is a no-no... Kind regards, -Evert- On Mon, Mar 28, 2011 at 6:17 AM, Stephane Ch

Re: files on not mounted subvolumes - mysql complains read only

2011-04-05 Thread Li Zefan
krz...@gmail.com wrote: > When I've used btrfs subvolume, without separately mouting it, for > mysql database dir I've got > Fatal error: Can't open and lock privilege tables: Table 'host' is read only > when starting mysql. When I've put mysql database dir in root of > btrfs, not a subvolume, mysq

Re: [PATCH 2/2 v2] Btrfs: Per file/directory controls for COW and compression

2011-04-05 Thread Li Zefan
liubo wrote: > On 04/04/2011 05:31 PM, Konstantinos Skarlatos wrote: >> Hello, >> I would like to ask about the status of this feature/patch, is it >> accepted into btrfs code, and how can I use it? >> > > Yes, it is now in the latest 2.6.39-rc1. > >> I am interested in enabling compression in a

Re: [PATCH 2/2 v2] Btrfs: Per file/directory controls for COW and compression

2011-04-05 Thread liubo
On 04/04/2011 05:31 PM, Konstantinos Skarlatos wrote: > Hello, > I would like to ask about the status of this feature/patch, is it > accepted into btrfs code, and how can I use it? > Yes, it is now in the latest 2.6.39-rc1. > I am interested in enabling compression in a specific > folder(force-c

[PATCH] Btrfs: don't split dio bios if we don't have to

2011-04-05 Thread Josef Bacik
We have been unconditionally allocating a new bio and re-adding all pages from our original bio to the new bio. This is needed if our original bio is larger than our stripe size, but if it is smaller than the stripe size then there is no need to do this. So check the map length and if we are unde

[PATCH] Btrfs: do not call btrfs_update_inode in endio if nothing changed

2011-04-05 Thread Josef Bacik
In the DIO code we often don't update the i_disk_size because the i_size isn't updated until after the DIO is completed, so basically we are allocating a path, doing a search, and updating the inode item for no reason since nothing changed. btrfs_ordered_update_i_size will return 1 if it didn't upd

[PATCH] Btrfs: don't kzalloc the ordered extents

2011-04-05 Thread Josef Bacik
We initialize almost all of the fields when we allocate an ordered extent, so use kmalloc instead of kzalloc and just initialize the other fields that we don't already initialize yet. Thanks, Signed-off-by: Josef Bacik --- fs/btrfs/ordered-data.c |4 +++- 1 files changed, 3 insertions(+), 1

files on not mounted subvolumes - mysql complains read only

2011-04-05 Thread krz...@gmail.com
When I've used btrfs subvolume, without separately mouting it, for mysql database dir I've got Fatal error: Can't open and lock privilege tables: Table 'host' is read only when starting mysql. When I've put mysql database dir in root of btrfs, not a subvolume, mysql works fine. I've checked file fo

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Josef Bacik
> > Now it hit Man I cannot catch a break. I hope this is the last one. Thanks, Josef --- fs/btrfs/free-space-cache.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 74bc

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Johannes Hirte
On Tuesday 05 April 2011 23:12:27 Josef Bacik wrote: > On Tue, Apr 05, 2011 at 11:08:52PM +0200, Johannes Hirte wrote: > > On Tuesday 05 April 2011 21:31:43 Josef Bacik wrote: > > > On Tue, Apr 05, 2011 at 09:21:55PM +0200, Johannes Hirte wrote: > > > > On Tuesday 05 April 2011 20:53:24 Josef Bacik

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Josef Bacik
On Tue, Apr 05, 2011 at 11:08:52PM +0200, Johannes Hirte wrote: > On Tuesday 05 April 2011 21:31:43 Josef Bacik wrote: > > On Tue, Apr 05, 2011 at 09:21:55PM +0200, Johannes Hirte wrote: > > > On Tuesday 05 April 2011 20:53:24 Josef Bacik wrote: > > > > On Tue, Apr 05, 2011 at 08:52:21PM +0200, Joh

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Josef Bacik
On Tue, Apr 05, 2011 at 09:21:55PM +0200, Johannes Hirte wrote: > On Tuesday 05 April 2011 20:53:24 Josef Bacik wrote: > > On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote: > > > On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote: > > > > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Joh

Re: Odd rebalancing behavior

2011-04-05 Thread Michel Alexandre Salim
On Tue, Apr 5, 2011 at 9:20 AM, Arne Jansen wrote: > On 04.04.2011 12:14, Michel Alexandre Salim wrote: >> I have an external 4-disk enclosure, connected through USB 2.0 (my >> laptop does not have a USB 3.0 connector, and the eSATA connector >> somehow does not work); it initially had a 2-disk bt

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Johannes Hirte
On Tuesday 05 April 2011 20:53:24 Josef Bacik wrote: > On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote: > > On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote: > > > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote: > > > > With the latest btrfs changes, I got this Oop

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Josef Bacik
On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote: > On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote: > > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote: > > > With the latest btrfs changes, I got this Oops when doing rm on a large > > > directory: > > > > > > BUG:

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Johannes Hirte
On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote: > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote: > > With the latest btrfs changes, I got this Oops when doing rm on a large > > directory: > > > > BUG: unable to handle kernel NULL pointer dereference at (null) > > IP: [] kun

Re: BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Josef Bacik
On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote: > With the latest btrfs changes, I got this Oops when doing rm on a large > directory: > > BUG: unable to handle kernel NULL pointer dereference at (null) > IP: [] kunmap+0x46/0x46 > *pdpt = 34a85001 *pde =

BUG: unable to handle kernel NULL pointer dereference at (null)

2011-04-05 Thread Johannes Hirte
With the latest btrfs changes, I got this Oops when doing rm on a large directory: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] kunmap+0x46/0x46 *pdpt = 34a85001 *pde = Oops: [#1] PREEMPT SMP last sysfs file: /sys/devices/virtual/vtconso

[PATCH] Btrfs: map the inode item when doing fill_inode_item

2011-04-05 Thread Josef Bacik
Instead of calling kmap_atomic for every thing we set in the inode item, map the entire inode item at the start and unmap it at the end. This makes a sequential dd of 400mb O_DIRECT something like 1% faster. Thanks, Signed-off-by: Josef Bacik --- fs/btrfs/inode.c | 12 1 files c

[PATCH] Btrfs: only retry transaction reservation once

2011-04-05 Thread Josef Bacik
I saw a lockup where we kept getting into this start transaction->commit transaction loop because of enospce. The fact is if we fail to make our reservation, we've tried _everything_ several times, so we only need to try and commit the transaction once, and if that doesn't work then we really are

Re: btrfs balancing start - and stop?

2011-04-05 Thread Struan Bartlett
On 01/04/11 12:59, Hugo Mills wrote: On Fri, Apr 01, 2011 at 12:14:50PM +0100, Struan Bartlett wrote: My company is testing btrfs (kernel 2.6.38) on a slave MySQL database server with a 195Gb filesystem (of which about 123Gb is used). So far, we're quite impressed with the performance. Our

Re: btrfs subvolume snapshot syntax too "smart"

2011-04-05 Thread Xavier Nicollet
Le 04 avril 2011 à 12:57, Freddie Cash a écrit: > Isn't this a situation where supporting a trailing / would help? > > For example, with the / at the end, means "put the snapshot into the > folder". Thus "btrfs subvolume snapshot /ssd/sub1 /ssd/5/" would > create a "sub1" snapshot inside the 5/ f

[GIT PULL] Btrfs pull for 2.6.39-rc2

2011-04-05 Thread Chris Mason
Hi everyone, The for-linus branch of the btrfs unstable tree has some bug fixes for btrfs. One fixes a regression from readonly snapshot support (2.6.38), where we can incorrectly treat a subvolume as readonly. git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus Tsu

Re: Odd rebalancing behavior

2011-04-05 Thread Arne Jansen
On 04.04.2011 12:14, Michel Alexandre Salim wrote: > I have an external 4-disk enclosure, connected through USB 2.0 (my > laptop does not have a USB 3.0 connector, and the eSATA connector > somehow does not work); it initially had a 2-disk btrfs soft-RAID1 file > system (both data and metadata are