Re: Scrub causes oom after removal of failed disk (linux 3.10)

2013-07-08 Thread Torbjørn Skagestad
On 07/08/2013 11:36 PM, David Sterba wrote: On Wed, Jul 03, 2013 at 08:35:48PM +0200, Torbjørn wrote: Hi btrfs devs, I have a btrfs raid10 array consisting of 2TB drives. I added a new drive to the array, then balanced. The balance failed after ~50GB was moved to the new drive. The balance fix

Re: [PATCH] btrfs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert

2013-07-08 Thread Qu Wenruo
于 2013年07月08日 21:24, David Sterba 写道: On Fri, Jul 05, 2013 at 10:01:30AM +0800, Qu Wenruo wrote: --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2807,6 +2846,14 @@ static inline unsigned long btrfs_leaf_data(struct extent_buffer *l) /* struct btrfs_file_extent_item */ BTRFS_SETGET_FUN

Re: btrfs: stat(2) and /proc/pid/maps returns different devices

2013-07-08 Thread David Sterba
On Thu, Jul 04, 2013 at 01:51:38PM +0400, Andrew Vagin wrote: > We are not first who suffer from this problem: > https://bugzilla.redhat.com/show_bug.cgi?id=711881 > http://marc.info/?l=linux-btrfs&m=130074451403261 > https://bugzilla.openvz.org/show_bug.cgi?id=2653 > And about 2 years ago Mark Fa

Re: Scrub causes oom after removal of failed disk (linux 3.10)

2013-07-08 Thread David Sterba
On Wed, Jul 03, 2013 at 08:35:48PM +0200, Torbjørn wrote: > Hi btrfs devs, > > I have a btrfs raid10 array consisting of 2TB drives. > > I added a new drive to the array, then balanced. > The balance failed after ~50GB was moved to the new drive. > The balance fixed lots of errors according to dm

Re: Does balance implicitly defrag?

2013-07-08 Thread Paul Richards
On 8 July 2013 22:12, David Sterba wrote: > On Tue, Jul 02, 2013 at 02:28:25PM +0100, Paul Richards wrote: >> When I run "btrfs filesystem balance", does this implicitly >> defragment the filesystem? (Assuming there is plenty free space) > > In some sense it defragments the filesystem. The blockg

Re: Does balance implicitly defrag?

2013-07-08 Thread David Sterba
On Tue, Jul 02, 2013 at 02:28:25PM +0100, Paul Richards wrote: > When I run "btrfs filesystem balance", does this implicitly > defragment the filesystem? (Assuming there is plenty free space) In some sense it defragments the filesystem. The blockgroups are moved around based on the balance filter

Re: Qemu disk images on BTRFS suffer checksum errors

2013-07-08 Thread Thomas Kuther
Am 08.07.2013 15:20, schrieb Josef Bacik: > On Mon, Jul 08, 2013 at 10:08:46AM +0200, Thomas Kuther wrote: >> Hello, >> >> I'm about to migrate from VirtualBox to Qemu+VGA-Passthrough. All my virtual >> disk images are stored in a BTRFS subvolume on-top of a MDRAID 1. >> The host runs kernel 3.10,

Re: [PATCH] btrfs-progs: Fix automatic prerequisite generation

2013-07-08 Thread David Sterba
On Mon, Jul 08, 2013 at 06:46:07PM +0200, David Sterba wrote: > On Sat, Jul 06, 2013 at 05:22:31PM +0900, Kusanagi Kouichi wrote: > > Some files don't compile because of insufficient prerequisite. > > > > $ make btrfs > > ... > > [CC] btrfs.o > > btrfs.c:24:21: fatal error: version.h: No s

Re: [PATCH] btrfs-progs: Fix automatic prerequisite generation

2013-07-08 Thread David Sterba
On Sat, Jul 06, 2013 at 05:22:31PM +0900, Kusanagi Kouichi wrote: > Some files don't compile because of insufficient prerequisite. > > $ make btrfs > ... > [CC] btrfs.o > btrfs.c:24:21: fatal error: version.h: No such file or directory > #include "version.h" > ^ > com

Re: [PATCH v2] Btrfs-progs: remove incorrect slot decrement

2013-07-08 Thread Filipe David Manana
Ok, sorry. I'm not used to git send-email and related best practices. Thanks for letting me know. On Mon, Jul 8, 2013 at 5:14 PM, David Sterba wrote: > On Fri, Jul 05, 2013 at 09:43:34PM +0100, Filipe David Borba Manana wrote: >> In btrfs_set_block_flags() we want to check if the slot >> in the

Re: [PATCH v2] Btrfs-progs: remove incorrect slot decrement

2013-07-08 Thread David Sterba
On Fri, Jul 05, 2013 at 09:43:34PM +0100, Filipe David Borba Manana wrote: > In btrfs_set_block_flags() we want to check if the slot > in the leaf points to the first item in the leaf - if it > doesn't check if the previous item in the leaf is an extent > item. By removing this extra slot decrement

btrfsck: cmds-check.c:2063: check_owner_ref: Assertion `!(rec->is_root)' failed.

2013-07-08 Thread Mathieu Malaterre
Here is a wrap-up of what is going on on #btrfs. I am trying to boot my debian/squeeze system with btrfs filesystem. System was setup with an initial kernel 2.6.32. The system now refuses to boot. Booting using a live knopix 7.2.0 (kernel 3.9.6), I can see: $ sudo vgchange -ay /dev/voxbox $ mkdir

Re: [PATCH] btrfs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert

2013-07-08 Thread David Sterba
On Fri, Jul 05, 2013 at 10:01:30AM +0800, Qu Wenruo wrote: > --- a/fs/btrfs/ctree.h > +++ b/fs/btrfs/ctree.h > @@ -2807,6 +2846,14 @@ static inline unsigned long btrfs_leaf_data(struct > extent_buffer *l) > > /* struct btrfs_file_extent_item */ > BTRFS_SETGET_FUNCS(file_extent_type, struct btr

Re: btrfs crashes

2013-07-08 Thread Josef Bacik
On Mon, Jul 08, 2013 at 08:46:17AM +0200, Franziska Näpelt wrote: > Hi everybody, > > we are using a btrfs RAID 1 with four 2TB hard drives on a Debian 7.1 > (Kernel 3.9.6). > > After about one year of working, there was an error in messages log and the > filesystem was mounted read-only. > > Af

[PATCH v2 5/5] Btrfs-progs: don't ignore errors in extent-tree.c

2013-07-08 Thread Filipe David Borba Manana
Several function return values were being completely ignored. V2: Added more error checking all over extent-tree.c Signed-off-by: Filipe David Borba Manana --- extent-tree.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/extent-tree.c b/extent-tree.c

Re: Qemu disk images on BTRFS suffer checksum errors

2013-07-08 Thread Josef Bacik
On Mon, Jul 08, 2013 at 10:08:46AM +0200, Thomas Kuther wrote: > Hello, > > I'm about to migrate from VirtualBox to Qemu+VGA-Passthrough. All my virtual > disk images are stored in a BTRFS subvolume on-top of a MDRAID 1. > The host runs kernel 3.10, and Qemu 1.5.1. The Testing-VM is a Windows 7 >

Qemu disk images on BTRFS suffer checksum errors

2013-07-08 Thread Thomas Kuther
Hello, I'm about to migrate from VirtualBox to Qemu+VGA-Passthrough. All my virtual disk images are stored in a BTRFS subvolume on-top of a MDRAID 1. The host runs kernel 3.10, and Qemu 1.5.1. The Testing-VM is a Windows 7 64bit, using a RAW virtio disk with cache=none, same happens for qcow2,

[PATCH 13/13] btrfs-progs: fix memory leaks of device_list_add()

2013-07-08 Thread Anand Jain
memory allocated by device_list_add has to be freed, the function introduced here device_list_remove() would just go that. however the challenging part is about where we would call this function. there are two ways its handled the threads calling open_ctree_broken(), open_ctree() and open_ctree_