[PATCH 2/2] Btrfs: avoid unnecessary bitmap search for cluster setup

2011-11-15 Thread Li Zefan
setup_cluster_no_bitmap() searches all the extents and bitmaps starting from offset. Therefore if it returns -ENOSPC, all the bitmaps starting from offset are in the bitmaps list, so it's sufficient to search from this list in setup_cluser_bitmap(). Signed-off-by: Li Zefan --- fs/btrfs/free-spac

[PATCH 1/2] Btrfs: fix to search one more bitmap for cluster setup

2011-11-15 Thread Li Zefan
Suppose there are two bitmaps [0, 256], [256, 512] and one extent [100, 120] in the free space cache, and we want to setup a cluster with offset=50, bytes=50. In this case, there will be only one bitmap [256, 512] in the temporary bitmaps list, and then setup_cluster_bitmap() won't search bitmap [

Re: Don't prevent removal of devices that break raid reqs

2011-11-15 Thread Alexandre Oliva
On Nov 15, 2011, Ilya Dryomov wrote: > On Thu, Nov 10, 2011 at 09:21:00PM -0500, Chris Mason wrote: >> On Thu, Nov 10, 2011 at 05:32:48PM -0200, Alexandre Oliva wrote: >> > Instead of preventing the removal of devices that would render existing >> > raid10 or raid1 impossible, warn but go ahead w

Re: Introduce option to rebalance only metadata

2011-11-15 Thread Alexandre Oliva
On Nov 15, 2011, Ilya Dryomov wrote: > And the exact command to mimic your patch is > btrfs fi restripe start -m Thanks. I wasn't aware of the restripe patch when I wrote this Quick Hack (TM). -- Alexandre Oliva, freedom fighterhttp://FSFLA.org/~lxoliva/ You must be the change you wish

Re: [PATCH 2/3] xfstests 265: add a prealloc and reserve test

2011-11-15 Thread WuBo
On 11/16/2011 03:08 AM, Christoph Hellwig wrote: > On Tue, Nov 15, 2011 at 12:21:13PM -0600, Ben Myers wrote: >> Hi Wu Bo, >> >> On Thu, Nov 03, 2011 at 11:09:00AM +0800, WuBo wrote: >>> This test is for preallocation test. If the disk is full, just with a >>> prealloc >>> file has some free space

Re: Don't prevent removal of devices that break raid reqs

2011-11-15 Thread Chris Mason
On Tue, Nov 15, 2011 at 11:37:13AM +0200, Ilya Dryomov wrote: > On Thu, Nov 10, 2011 at 09:21:00PM -0500, Chris Mason wrote: > > On Thu, Nov 10, 2011 at 05:32:48PM -0200, Alexandre Oliva wrote: > > > Instead of preventing the removal of devices that would render existing > > > raid10 or raid1 impos

[GIT PULL] various updates for -rc3

2011-11-15 Thread Josef Bacik
Hey Chris, Here are the cluster rework patches from Alexandre along with my tracepoints patch and a couple of bugfixes. This should fix the panics we've been seeing when running xfstests 13 in a loop. The cluster fixes I've been testing for a while, and the tracepoints patch I used to profile th

[PATCH] Btrfs: wait on caching if we're loading the free space cache

2011-11-15 Thread Josef Bacik
We've been hitting panics when running xfstest 13 in a loop for long periods of time. And actually this problem has always existed so we've been hitting these things randomly for a while. Basically what happens is we get a thread coming into the allocator and reading the space cache off of disk a

Re: WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0

2011-11-15 Thread Stefan Kleijkers
Hello Josef, We have patched the 3.1.1 kernel with your patch and after a short time one of the ceph osds crashed (core dumped) and I found this in the dmesg, please let me know if that's enough information or if you need more. Stefan [11226.207447] [ cut here ] [1122

Re: WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0

2011-11-15 Thread Josef Bacik
On Tue, Nov 15, 2011 at 08:13:43PM +0100, Stefan Kleijkers wrote: > Hello Josef, > > We have patched the 3.1.1 kernel with your patch and after a short > time one of the ceph osds crashed (core dumped) and I found this in > the dmesg, please let me know if that's enough information or if you > nee

Re: [PATCH 2/3] xfstests 265: add a prealloc and reserve test

2011-11-15 Thread Christoph Hellwig
On Tue, Nov 15, 2011 at 12:21:13PM -0600, Ben Myers wrote: > Hi Wu Bo, > > On Thu, Nov 03, 2011 at 11:09:00AM +0800, WuBo wrote: > > This test is for preallocation test. If the disk is full, just with a > > prealloc > > file has some free space that prealloc early. We need to check whether the >

Re: [PATCH 2/3] xfstests 265: add a prealloc and reserve test

2011-11-15 Thread Ben Myers
Hi Wu Bo, On Thu, Nov 03, 2011 at 11:09:00AM +0800, WuBo wrote: > This test is for preallocation test. If the disk is full, just with a prealloc > file has some free space that prealloc early. We need to check whether the > write > to the free space is success or not. > > Signed-off-by: Wu Bo

Re: Btrfs progs git repo on kernel.org

2011-11-15 Thread Phillip Susi
On 10/27/2011 11:27 AM, Chris Mason wrote: Hi everyone, I've pulled in Hugo's integration tree, minus the features that were not yet in the kernel. This also has a few small commits that I had queued up outside of the fsck work. Hugo, many thanks for keeping up the integration tree! Taking ou

Re: [PATCH 00/21] [RFC] Btrfs: restriper

2011-11-15 Thread Ilya Dryomov
On Tue, Nov 15, 2011 at 09:33:14AM -0500, Phillip Susi wrote: > On 11/15/2011 4:22 AM, Ilya Dryomov wrote: > >Restriper won't let you do raid1 -> dup transition because dup is only > >allowed for a single-spindle FS, so you'll end up with error "btrfs: > >unable to start restripe ...". > > > >Ther

Re: [PATCH 00/21] [RFC] Btrfs: restriper

2011-11-15 Thread Phillip Susi
On 11/15/2011 4:22 AM, Ilya Dryomov wrote: Restriper won't let you do raid1 -> dup transition because dup is only allowed for a single-spindle FS, so you'll end up with error "btrfs: unable to start restripe ...". There is no way to prioritize disks during restripe. To get dup back you'll have

[PATCH] Btrfs: clear pages dirty for io and set them extent mapped

2011-11-15 Thread Josef Bacik
When doing the io_ctl helpers to clean up the free space cache stuff I stopped using our normal prepare_pages stuff, which means I of course forgot to do things like set the pages extent mapped, which will cause us all sorts of wonderful propblems. Thanks, Signed-off-by: Josef Bacik --- fs/btrf

Re: Reliability questions / "me too" for bugs

2011-11-15 Thread Josef Bacik
On Mon, Nov 14, 2011 at 05:12:13PM -0500, Jérôme Carretero wrote: > I have a couple of questions concerning btrfs reliability. > > I'm currently using btrfs in my internal drives (strong advantages) and have > used it on external drives, but I've recently migrated the external ones to > ext4, fo

Re: Introduce option to rebalance only metadata

2011-11-15 Thread Ilya Dryomov
On Tue, Nov 15, 2011 at 11:40:04AM +0200, Ilya Dryomov wrote: > On Thu, Nov 10, 2011 at 07:43:07PM +, Hugo Mills wrote: > > On Thu, Nov 10, 2011 at 05:40:56PM -0200, Alexandre Oliva wrote: > > > Experimental patch to be able to compact only the metadata after > > > clustered allocation allocate

Re: Introduce option to rebalance only metadata

2011-11-15 Thread Ilya Dryomov
On Thu, Nov 10, 2011 at 07:43:07PM +, Hugo Mills wrote: > On Thu, Nov 10, 2011 at 05:40:56PM -0200, Alexandre Oliva wrote: > > Experimental patch to be able to compact only the metadata after > > clustered allocation allocated lots of unnecessary metadata block > > groups. It's also useful to

Re: Don't prevent removal of devices that break raid reqs

2011-11-15 Thread Ilya Dryomov
On Thu, Nov 10, 2011 at 09:21:00PM -0500, Chris Mason wrote: > On Thu, Nov 10, 2011 at 05:32:48PM -0200, Alexandre Oliva wrote: > > Instead of preventing the removal of devices that would render existing > > raid10 or raid1 impossible, warn but go ahead with it; the rebalancing > > code is smart en

Re: [PATCH 00/21] [RFC] Btrfs: restriper

2011-11-15 Thread Ilya Dryomov
On Mon, Nov 14, 2011 at 06:59:14PM -0500, Phillip Susi wrote: > I have a fs that started with the default policy of metadata=dup. I > added a second device and rebalanced, and so the metadata chunks were > converted to raid1. Now I can not remove the second device because > raid1 requires at leas

BUG at fs/btrfs/inode.c:1587

2011-11-15 Thread Christian Brunner
Hi, this time I've hit a new bug. This happened while ceph was rebuilding his filestore (heavy io). The btrfs version is from 3.2-rc1, applied to a 3.0 kernel. Regards, Christian [28981.550478] [ cut here ] [28981.555625] kernel BUG at fs/btrfs/inode.c:1587! [28981.56077