Re: Backup of btrfs with metadata?

2012-04-24 Thread Hubert Kario
On Monday 23 of April 2012 13:53:57 Ken D'Ambrosio wrote: I know this question was asked, oh, a year ago, and the answer was No. But I'm wondering if anything's changed in the interim. Specifically, shy of dd, is there any way to back up the files and metadata on a btrfs partition? btrfs

Re: [PATCH] Btrfs: do not do filemap_write_and_wait_range in fsync

2012-04-24 Thread Josef Bacik
On Mon, Apr 23, 2012 at 07:29:45PM -0400, Chris Mason wrote: On Mon, Apr 23, 2012 at 03:06:41PM -0400, Josef Bacik wrote: We already do the btrfs_wait_ordered_range which will do this for us, so just remove this call so we don't call it twice. Thanks, Signed-off-by: Josef Bacik

Re: [PATCH] Prevent root_list corruption

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 01:11:40PM +0800, Daniel J Blueman wrote: I was seeing root_list corruption on unmount during fs resize in 3.4-rc4; add correct locking to address this. Signed-off-by: Daniel J Blueman dan...@quora.org --- fs/btrfs/relocation.c |2 ++ 1 file changed, 2

[PATCH] Btrfs: swap order of two spinlocks (lockdep complains)

2012-04-24 Thread Stefan Behrens
may_commit_transaction() calls spin_lock(space_info-lock); spin_lock(delayed_rsv-lock); and update_global_block_rsv() calls spin_lock(block_rsv-lock); spin_lock(sinfo-lock); Lockdep complains about this at run time. Everywhere except in update_global_block_rsv(),

mkfs.btrfs on arm

2012-04-24 Thread Tobias Arp
Hi, yesterday i tried mkfs.btrfs on my embedded arm system without success (git clone from 2012-04-24). I got always this error message (this bug where already mentioned some month ago) mkfs.btrfs /dev/sda1 WARNING!

mkfs.btrfs on arm

2012-04-24 Thread Tobias Arp
Hi, yesterday i tried mkfs.btrfs on my embedded arm system without success (git clone from 2012-04-24). I got always this error message (this bug where already mentioned some month ago) mkfs.btrfs /dev/sda1 WARNING!

Re: [PATCH] Btrfs: complete page writeback before doing ordered extents

2012-04-24 Thread Chris Mason
On Tue, Apr 24, 2012 at 09:50:39AM +0800, Liu Bo wrote: On 04/24/2012 01:33 AM, Josef Bacik wrote: We can deadlock waiting for pages to end writeback because we are doing an allocation while hold a tree lock since the ordered extent stuff will require tree locks. A quick easy way to fix

Re: [PATCH] Btrfs: do not do filemap_write_and_wait_range in fsync

2012-04-24 Thread Chris Mason
On Tue, Apr 24, 2012 at 09:14:47AM -0400, Josef Bacik wrote: On Mon, Apr 23, 2012 at 07:29:45PM -0400, Chris Mason wrote: On Mon, Apr 23, 2012 at 03:06:41PM -0400, Josef Bacik wrote: We already do the btrfs_wait_ordered_range which will do this for us, so just remove this call so we don't

Re: Ceph on btrfs 3.4rc

2012-04-24 Thread Josef Bacik
On Fri, Apr 20, 2012 at 05:09:34PM +0200, Christian Brunner wrote: After running ceph on XFS for some time, I decided to try btrfs again. Performance with the current for-linux-min branch and big metadata is much better. The only problem (?) I'm still seeing is a warning that seems to occur

Re: bug?

2012-04-24 Thread Josef Bacik
On Sat, Apr 21, 2012 at 02:53:55PM +0200, Thomas Weber wrote: Hello, today my laptop crashed with the following output. Installed is Archlinux with btrfs on a SSD. Is it btrfs related? Sort of an old kernel, can you try on something recent? It doesn't look familiar but who knows. Thanks,

Re: 'filesystem resize max' tries to use devid 1

2012-04-24 Thread Josef Bacik
On Sun, Apr 22, 2012 at 11:03:06PM -0400, Jeremy Atkins wrote: Back story: I started my pool with a 200gb partition at the end of my drive (sdc5) , until I was able to clear out the data at the beginning of my drive. When I was ready, I ran `btrfs dev add /dev/sdc4 /` then `btrfs dev del

Re: 'filesystem resize max' tries to use devid 1

2012-04-24 Thread Ilya Dryomov
On Tue, Apr 24, 2012 at 11:31:15AM -0400, Josef Bacik wrote: On Sun, Apr 22, 2012 at 11:03:06PM -0400, Jeremy Atkins wrote: Back story: I started my pool with a 200gb partition at the end of my drive (sdc5) , until I was able to clear out the data at the beginning of my drive. When I was

Re: 'filesystem resize max' tries to use devid 1

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 06:39:03PM +0300, Ilya Dryomov wrote: On Tue, Apr 24, 2012 at 11:31:15AM -0400, Josef Bacik wrote: On Sun, Apr 22, 2012 at 11:03:06PM -0400, Jeremy Atkins wrote: Back story: I started my pool with a 200gb partition at the end of my drive (sdc5) , until I was

Re: bug?

2012-04-24 Thread Thomas Weber
Hello Josef, On 04/24/2012 05:26 PM, Josef Bacik wrote: On Sat, Apr 21, 2012 at 02:53:55PM +0200, Thomas Weber wrote: Hello, today my laptop crashed with the following output. Installed is Archlinux with btrfs on a SSD. Is it btrfs related? Sort of an old kernel, can you try on something

block_rsv_check EAGAIN vs ENOSPC...

2012-04-24 Thread Daniel J Blueman
With 3.4-rc4 under certain workloads, I see btrfs_block_rsv_check return -ENOSPC. Since btrfs_block_rsv_check can only return -ENOSPC or 0, relocation.c:3816 checks for -EAGAIN, which is either redundant or should be -ENOSPC, which I initially suspected. Let me know which the behaviour should be

Re: [PATCH] Btrfs: swap order of two spinlocks (lockdep complains)

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 04:02:09PM +0200, Stefan Behrens wrote: may_commit_transaction() calls spin_lock(space_info-lock); spin_lock(delayed_rsv-lock); and update_global_block_rsv() calls spin_lock(block_rsv-lock); spin_lock(sinfo-lock); Lockdep complains

Re: block_rsv_check EAGAIN vs ENOSPC...

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 11:50:24PM +0800, Daniel J Blueman wrote: With 3.4-rc4 under certain workloads, I see btrfs_block_rsv_check return -ENOSPC. Since btrfs_block_rsv_check can only return -ENOSPC or 0, relocation.c:3816 checks for -EAGAIN, which is either redundant or should be -ENOSPC,

Re: 'filesystem resize max' tries to use devid 1

2012-04-24 Thread Ilya Dryomov
On Tue, Apr 24, 2012 at 11:42:26AM -0400, Josef Bacik wrote: On Tue, Apr 24, 2012 at 06:39:03PM +0300, Ilya Dryomov wrote: On Tue, Apr 24, 2012 at 11:31:15AM -0400, Josef Bacik wrote: On Sun, Apr 22, 2012 at 11:03:06PM -0400, Jeremy Atkins wrote: Back story: I started my pool with a

Re: 'filesystem resize max' tries to use devid 1

2012-04-24 Thread Chris Mason
On Tue, Apr 24, 2012 at 11:42:26AM -0400, Josef Bacik wrote: On Tue, Apr 24, 2012 at 06:39:03PM +0300, Ilya Dryomov wrote: On Tue, Apr 24, 2012 at 11:31:15AM -0400, Josef Bacik wrote: On Sun, Apr 22, 2012 at 11:03:06PM -0400, Jeremy Atkins wrote: Back story: I started my pool with a

Re: Ceph on btrfs 3.4rc

2012-04-24 Thread Sage Weil
On Tue, 24 Apr 2012, Josef Bacik wrote: On Fri, Apr 20, 2012 at 05:09:34PM +0200, Christian Brunner wrote: After running ceph on XFS for some time, I decided to try btrfs again. Performance with the current for-linux-min branch and big metadata is much better. The only problem (?) I'm still

Re: [PATCH] btrfs: allow changing 'thread_pool' size at remount time

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 08:26:44PM +0300, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Changing 'mount -oremount,thread_pool=2 /' didn't make any effect: maximum amount of worker threads is specified in 2 places: - in 'strict btrfs_fs_info::thread_pool_size' - in

Re: Ceph on btrfs 3.4rc

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 09:26:15AM -0700, Sage Weil wrote: On Tue, 24 Apr 2012, Josef Bacik wrote: On Fri, Apr 20, 2012 at 05:09:34PM +0200, Christian Brunner wrote: After running ceph on XFS for some time, I decided to try btrfs again. Performance with the current for-linux-min branch

Re: Ceph on btrfs 3.4rc

2012-04-24 Thread Neil Horman
On Tue, Apr 24, 2012 at 01:33:44PM -0400, Josef Bacik wrote: On Tue, Apr 24, 2012 at 09:26:15AM -0700, Sage Weil wrote: On Tue, 24 Apr 2012, Josef Bacik wrote: On Fri, Apr 20, 2012 at 05:09:34PM +0200, Christian Brunner wrote: After running ceph on XFS for some time, I decided to try

Re: [PATCH] btrfs: allow changing 'thread_pool' size at remount time

2012-04-24 Thread Sergei Trofimovich
On Tue, 24 Apr 2012 13:32:37 -0400 Josef Bacik jo...@redhat.com wrote: On Tue, Apr 24, 2012 at 08:26:44PM +0300, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Changing 'mount -oremount,thread_pool=2 /' didn't make any effect: maximum amount of worker threads is

Re: [PATCH] btrfs: allow changing 'thread_pool' size at remount time

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 09:11:15PM +0300, Sergei Trofimovich wrote: On Tue, 24 Apr 2012 13:32:37 -0400 Josef Bacik jo...@redhat.com wrote: On Tue, Apr 24, 2012 at 08:26:44PM +0300, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Changing 'mount

[btrfs-progs] [bug][patch] Leaking file handle in scrub_fs_info()

2012-04-24 Thread Goffredo Baroncelli
Hi Jan, I was giving a look to the function scrub_fs_info( ), and to me it seems that could be a potential file handle leaking problem. In fact: static int scrub_fs_info(int fd, char *path, struct btrfs_ioctl_fs_info_args *fi_args, struct

[PATCH v2] btrfs: allow changing 'thread_pool' size at remount time

2012-04-24 Thread Sergei Trofimovich
From: Sergei Trofimovich sly...@gentoo.org Changing 'mount -oremount,thread_pool=2 /' didn't make any effect: maximum amount of worker threads is specified in 2 places: - in 'strict btrfs_fs_info::thread_pool_size' - in each worker struct: 'struct btrfs_workers::max_workers' 'mount -oremount'

Re: [PATCH v2] btrfs: allow changing 'thread_pool' size at remount time

2012-04-24 Thread Josef Bacik
On Tue, Apr 24, 2012 at 10:59:16PM +0300, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Changing 'mount -oremount,thread_pool=2 /' didn't make any effect: maximum amount of worker threads is specified in 2 places: - in 'strict btrfs_fs_info::thread_pool_size' - in

Re: [PATCH 1/3] btrfs: extended inode refs

2012-04-24 Thread Mark Fasheh
Jan, firstly thanks very much for the thorough review! I wanted to make sure I got the collision handling going before addressing the issues you found. Again thanks, and my notes are below. On Thu, Apr 12, 2012 at 03:08:27PM +0200, Jan Schmidt wrote: +/* + * Theoretical limit is larger, but