On 26.01.20 г. 18:09 ч., Raviu wrote: > Here is dmesg output: > > [ 237.525947] assertion failed: prev, in ../fs/btrfs/extent_io.c:1595 > [ 237.525984] ------------[ cut here ]------------ > [ 237.525985] kernel BUG at ../fs/btrfs/ctree.h:3117! > [ 237.525992] invalid opcode: 0000 [#1] SMP PTI > [ 237.525998] CPU: 4 PID: 4423 Comm: fstrim Tainted: G U OE 5.4.14-8-vanilla #1 > [ 237.526001] Hardware name: ASUSTeK COMPUTER INC. > [ 237.526044] RIP: 0010:assfail.constprop.58+0x18/0x1a [btrfs] > [ 237.526048] Code: 0b 0f 1f 44 00 00 48 8b 3d 15 9e 07 00 e9 70 20 ce e2 89 f1 48 c7 c2 ae 27 77 c0 48 89 fe 48 c7 c7 20 87 77 c0 e8 56 c5 ba e2 <0f> 0b 0f 1f 44 00 00 e8 9c 1b bc e2 48 8b 3d 7d 9f 07 00 e8 40 20 > [ 237.526053] RSP: 0018:ffffae2cc2befc20 EFLAGS: 00010282 > [ 237.526056] RAX: 0000000000000037 RBX: 0000000000000021 RCX: 0000000000000000 > [ 237.526059] RDX: 0000000000000000 RSI: ffff94221eb19a18 RDI: ffff94221eb19a18 > [ 237.526062] RBP: ffff942216ce6e00 R08: 0000000000000403 R09: 0000000000000001 > [ 237.526064] R10: ffffae2cc2befc38 R11: 0000000000000001 R12: ffffae2cc2befca0 > [ 237.526067] R13: ffff942216ce6e24 R14: ffffae2cc2befc98 R15: 0000000000100000 > [ 237.526071] FS: 00007fa1b8087fc0(0000) GS:ffff94221eb00000(0000) knlGS:0000000000000000 > [ 237.526074] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 237.526076] CR2: 000032eed3b5a000 CR3: 00000007c33bc002 CR4: 00000000003606e0 > [ 237.526079] Call Trace: > [ 237.526120] find_first_clear_extent_bit+0x13d/0x150 [btrfs] So you are hitting the ASSERT(prev) in find_first_clear_extent_bit. The good news is this is just an in-memory state and it's used to optimize fstrim so that only non-trimmed regions are being trimmed. This state is cleared on unmount so if you mount/remount then you shouldn't be hitting it. But then again, the ASSERT is there to catch an impossible case. To help me debug this could you provide the output of: btrfs fi show /home And then the output of btrfs inspect-internal dump-tree -t3 /dev/XXX where XXX should be the block device that contains the fs mounted on /home .
