Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Stéphane Lesimple
Le 2015-10-22 19:03, Filipe Manana a écrit : On Thu, Oct 22, 2015 at 3:58 PM, Stéphane Lesimple <stephane_bt...@lesimple.fr> wrote: Le 2015-10-22 11:47, Filipe Manana a écrit : On Thu, Oct 22, 2015 at 10:43 AM, Filipe Manana <fdman...@kernel.org> wrote: On Thu, Oct 22, 2015 at

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-23 Thread Stéphane Lesimple
Le 2015-10-23 12:11, Filipe Manana a écrit : On Fri, Oct 23, 2015 at 12:03 AM, Filipe Manana <fdman...@kernel.org> wrote: On Thu, Oct 22, 2015 at 11:38 PM, Stéphane Lesimple <stephane_bt...@lesimple.fr> wrote: [ ... thread cleanup ... ] Don't hesitate to ask if you need me to d

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Stéphane Lesimple
[ ... thread cleanup ... ] Don't hesitate to ask if you need me to debug or even ftrace something. Thanks Stéphane. I haven't seen that crash yet (still running tests for 2 consecutive days now). Can you please try the following patch, which works on top of mine, and enable ftrace before

Re: BTRFS BUG at insert_inline_extent_backref+0xe3/0xf0 while rebalancing

2015-10-22 Thread Stéphane Lesimple
Le 2015-10-22 10:53, Filipe Manana a écrit : On Thu, Oct 22, 2015 at 6:32 AM, Erkki Seppala wrote: Hello, Recently I added daily rebalancing to my cron.d (after finding myself in the no-space-situation), and not long after that, I found my PC had crashed over night.

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Stéphane Lesimple
now, I would like to get this fixed and later, if there's a better (new) solution for this, we can get it in. thanks Thanks, Qu Fixes: c6fc24549960 ("btrfs: delayed-ref: Use list to replace the ref_root in ref_head.") Reported-by: Peter Becker <floyd@gmail.com> Rep

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-23 Thread Stéphane Lesimple
Le 2015-10-23 12:59, Stéphane Lesimple a écrit : Le 2015-10-23 12:11, Filipe Manana a écrit : On Fri, Oct 23, 2015 at 12:03 AM, Filipe Manana <fdman...@kernel.org> wrote: On Thu, Oct 22, 2015 at 11:38 PM, Stéphane Lesimple <stephane_bt...@lesimple.fr> wrote: [ ... thread cleanup

Re: kernel BUG at /linux/fs/btrfs/extent-tree.c:1833!

2015-10-11 Thread Stéphane Lesimple
Hello Peter, I have the same problem you have, as reported ~1 month ago on this mailing-list. My setup is 2 disks, and I tried balancing after adding a third one, in a raid5 configuration. I also have some "extent buffer leak" in my btrfsck, but it's hard to say if it can be the cause. If

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-16 Thread Stéphane Lesimple
Le 2015-09-16 07:02, Duncan a écrit : Stéphane Lesimple posted on Tue, 15 Sep 2015 23:47:01 +0200 as excerpted: Le 2015-09-15 16:56, Josef Bacik a écrit : On 09/15/2015 10:47 AM, Stéphane Lesimple wrote: I've been experiencing repetitive "kernel BUG" occurences in the past few d

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-16 Thread Stéphane Lesimple
Le 2015-09-16 12:46, Holger Hoffstätte a écrit : On 09/16/15 12:28, Stéphane Lesimple wrote: Nice to know that this bug was already somewhat known, but I can confirm that it actually doesn't come from an ext4 conversion on my case. In that case the "crossing stripe boundary"

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-15 Thread Stéphane Lesimple
Le 2015-09-15 16:56, Josef Bacik a écrit : On 09/15/2015 10:47 AM, Stéphane Lesimple wrote: I've been experiencing repetitive "kernel BUG" occurences in the past few days trying to balance a raid5 filesystem after adding a new drive. It occurs on both 4.2.0 and 4.1.7, using 4.2

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-16 Thread Stéphane Lesimple
Le 2015-09-16 22:18, Duncan a écrit : Stéphane Lesimple posted on Wed, 16 Sep 2015 15:04:20 +0200 as excerpted: Le 2015-09-16 12:46, Holger Hoffstätte a écrit : I also disabled quota because it has almost for sure nothing to do with the bug, and now btrsfck is 100% happy: Yes. Quotas

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-17 Thread Stéphane Lesimple
Le 2015-09-17 05:03, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/16 22:41 +0200: Le 2015-09-16 22:18, Duncan a écrit : Stéphane Lesimple posted on Wed, 16 Sep 2015 15:04:20 +0200 as excerpted: Well actually it's the (d) option ;) I activate the quota feature for only one reason

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-17 Thread Stéphane Lesimple
Le 2015-09-16 15:04, Stéphane Lesimple a écrit : I also disabled quota because it has almost for sure nothing to do with the bug As it turns out, it seems that this assertion was completely wrong. I've got balance running for more than 16 hours now, without a crash. This is almost 50

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-17 Thread Stéphane Lesimple
Le 2015-09-17 08:29, Stéphane Lesimple a écrit : Le 2015-09-16 15:04, Stéphane Lesimple a écrit : I also disabled quota because it has almost for sure nothing to do with the bug As it turns out, it seems that this assertion was completely wrong. I've got balance running for more than 16

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-17 Thread Stéphane Lesimple
Le 2015-09-17 08:42, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/17 08:11 +0200: Le 2015-09-17 05:03, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/16 22:41 +0200: Le 2015-09-16 22:18, Duncan a écrit : Stéphane Lesimple posted on Wed, 16 Sep 2015 15:04:20 +0200

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-17 Thread Stéphane Lesimple
Le 2015-09-17 10:11, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/17 10:02 +0200: Le 2015-09-17 08:42, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/17 08:11 +0200: Le 2015-09-17 05:03, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/16 22:41 +0200: Le 2015-09-16

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-17 Thread Stéphane Lesimple
Le 2015-09-17 12:41, Qu Wenruo a écrit : In the meantime, I've reactivated quotas, umounted the filesystem and ran a btrfsck on it : as you would expect, there's no qgroup problem reported so far. At least, rescan code is working without problem. I'll clear all my snapshots, run an quota

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-15 Thread Stéphane Lesimple
I've been experiencing repetitive "kernel BUG" occurences in the past few days trying to balance a raid5 filesystem after adding a new drive. It occurs on both 4.2.0 and 4.1.7, using 4.2 userspace tools. I've ran a scrub on this filesystem after the crash happened twice, and if found no

ftrace of kernel BUG at extent-tree.c during balance

2015-09-29 Thread Stéphane Lesimple
Hello, This bug has been discussed several times here already, both recently and also in 2012 where the bug was deemed fixed in btrfs-next, but probably wasn't in the end [1]. It has also been reported at a couple other places, such as [2]. I managed to add some trace_printk's at the

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-20 Thread Stéphane Lesimple
Le 2015-09-20 12:51, Qu Wenruo a écrit : Would you please use gdb to show the codes of "btrfs_qgroup_rescan_worker+0x388" ? (Need kernel debuginfo) My guess is the following line:(pretty sure, but not 100% sure) -- /* * only update status, since the previous part has alreay updated

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-20 Thread Stéphane Lesimple
Le 2015-09-20 03:22, Qu Wenruo a écrit : The mentioned steps are as follows : 0) Rsync data from the next ext4 "snapshot" to the subvolume 1) Do 'sync; btrfs qgroup show -⁠prce -⁠-⁠raw' and save the output <== 2) Create the needed readonly snapshot on btrfs 3) Do 'sync; btrfs qgroup show

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-18 Thread Stéphane Lesimple
Le 2015-09-18 02:59, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/17 20:47 +0200: Le 2015-09-17 12:41, Qu Wenruo a écrit : In the meantime, I've reactivated quotas, umounted the filesystem and ran a btrfsck on it : as you would expect, there's no qgroup problem reported so far

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-18 Thread Stéphane Lesimple
Le 2015-09-18 09:36, Stéphane Lesimple a écrit : Sure, I did a quota disable / quota enable before running the snapshot debug procedure, so the qgroups were clean again when I started : qgroupid rfer excl max_rfer max_excl parent child

Re: [PATCH 0/2] Btrfs: Fix a insane extent_buffer copy behavior for qgroup

2015-09-25 Thread Stéphane Lesimple
Le 2015-09-25 04:37, Qu Wenruo a écrit : Stephane Lesimple reported an qgroup rescan bug: [92098.841309] general protection fault: [#1] SMP [92098.841338] Modules linked in: ... [92098.841814] CPU: 1 PID: 24655 Comm: kworker/u4:12 Not tainted 4.3.0-rc1 #1 [92098.841868] Workqueue:

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-21 Thread Stéphane Lesimple
Le 2015-09-20 13:14, Stéphane Lesimple a écrit : Le 2015-09-20 12:51, Qu Wenruo a écrit : Would you please use gdb to show the codes of "btrfs_qgroup_rescan_worker+0x388" ? (Need kernel debuginfo) My guess is the following line:(pretty sure, but not 100% sure) -- /* * o

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-22 Thread Stéphane Lesimple
Le 2015-09-22 03:37, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/22 03:30 +0200: Le 2015-09-20 13:14, Stéphane Lesimple a écrit : Le 2015-09-20 12:51, Qu Wenruo a écrit : Would you please use gdb to show the codes of "btrfs_qgroup_rescan_worker+0x388" ? (Need kernel debu

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-18 Thread Stéphane Lesimple
Le 2015-09-18 12:15, Stéphane Lesimple a écrit : Le 2015-09-18 09:36, Stéphane Lesimple a écrit : Sure, I did a quota disable / quota enable before running the snapshot debug procedure, so the qgroups were clean again when I started : qgroupid rfer excl max_rfer

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-23 Thread Stéphane Lesimple
Le 2015-09-23 09:03, Qu Wenruo a écrit : Stéphane Lesimple wrote on 2015/09/22 16:31 +0200: Le 2015-09-22 10:51, Qu Wenruo a écrit : [92098.842261] Call Trace: [92098.842277] [] ? read_extent_buffer+0xb8/0x110 [btrfs] [92098.842304] [] ? btrfs_find_all_roots+0x60/0x70 [btrfs

btrfs-progs: enhanced btrfsck progress patch proposition

2015-12-14 Thread Stéphane Lesimple
Hi, I've been forking btrfs-progs locally to add an enhanced progress indicator, based on the work from Silvio Fricke posted here in September. I'm using it routinely, it has been of help when I was debugging my multi-Tb btrfs system, where I often had to use btrfs check. So I thought it

[PATCH 0/2] btrfs-progs: check: enhanced progress indicator

2018-07-04 Thread Stéphane Lesimple
hecked) [7/7] checking quota groups skipped (not enabled on this FS) found 5286458060800 bytes used, no error found The code is also viewable at https://github.com/kdave/btrfs-progs/pull/69 Stéphane Lesimple (2): btrfs-progs: fix nanosecs in task_period_start btrfs-progs: check: enhance

[PATCH 2/2] btrfs-progs: check: enhanced progress indicator

2018-07-04 Thread Stéphane Lesimple
We reuse the task_position enum and task_ctx struct of the original progress indicator, adding more values and fields for our needs. Then add hooks in all steps of the check to properly record progress. Signed-off-by: Stéphane Lesimple --- check/main.c| 176

[PATCH 1/2] btrfs-progs: fix nanosecs in task_period_start

2018-07-04 Thread Stéphane Lesimple
This is a single-line fix on the preexisting task_period_start function. Signed-off-by: Stéphane Lesimple --- task-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task-utils.c b/task-utils.c index 12b0002..284cbb3 100644 --- a/task-utils.c +++ b/task-utils.c