We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2016-04-29 14:37:45 +0200

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
[  621.139111] btrfs is forced readonly
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, this seeme like as soon as balancing get's triggered, as in mounted Any ideas how I could reset my device?

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
[  621.139111] btrfs is forced readonly
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, this seeme like as soon as balancing get's triggered, as in mounted Any ideas how I could reset my device?

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
and
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
[  621.139111] btrfs is forced readonly
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, this seeme like as soon as balancing get's triggered, as in mounted things go wrong. Any ideas how I could reset my device?

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
and
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
[  621.139111] btrfs is forced readonly
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, this it seeme like as soon as balancing get's gets triggered, things go wrong. Any ideas how I could reset my device?

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
and
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
[  621.139111] btrfs is forced readonly
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, it seeme like as soon as balancing gets triggered, things go wrong. Any ideas how I could reset my device?

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
and
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
[ **[  621.139111] btrfs is forced readonly
readonly**
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, it seeme like as soon as balancing gets triggered, things go wrong. Any ideas how I could reset my device?

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
and
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
**[  621.139111] btrfs is forced readonly**
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, it seeme like as soon as balancing gets triggered, things go wrong. Any ideas how I could reset my device?

overdue update - tl;dr: I didn't try anything new yet and finally got a new device (I started a new job and couldn't spend any more time on this). I asked a few techies about their opinion but it turned out I did already try their recommendations like running repair or rebuilding uuids, so no new insights. The last thing I might try is to dd the whole volume with an factory image if I can find one. One last thing which came to my mind is that maybe a balance might not have been run properly or not at all before the update, so that _may_ be one possible reason of why the volume is now still "full". Just because I can't really remember and it's nagging me since, but it's rather unlikely that the volume was actually "full" before that. I had some stuff running in /opt tho, but these things were stuffing all their data into nemo homefolder.

bricked after trying update to 2.0.1.11, btrfs balancing issue?

Hi,

I tried to install the latest early update (2.0.1.11 I think), after I hit the "optimize" button the device rebooted and now I'm stuck with a blank screen and white LED after the jolla logo dissapeared. The device is not pingable in LAN either.

I can access recovery mode and the reason seems to be that /dev/mmcblk0p28 cannot be mounted in a writable manner. Here's what I've tried so far:


mount -t btrfs -o rw,recovery /dev/mmcblk0p28 /mnt
and
mount -t btrfs -o nospace_cache,clear_cache,enospc_debug,nodatacow /dev/mmcblk0p28 /mnt

/ # mount
rootfs on / type rootfs (rw)
none on /dev type devtmpfs (rw,relatime,size=412496k,nr_inodes=103124,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=10240k)
/proc/sys/debug on /proc/sys/debug type debugfs (rw,relatime)
none on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p28 on /mnt type btrfs (**ro**,relatime,ssd,noacl,space_cache)

If I do a "umount /mnt" afterwards, prompt gets stuck and nothing seems to happen. However, it does not when I use "-o remount,rw" instead, but it's still ro. It seems that everything comes down to this:


[  619.205371] device label sailfish devid 1 transid 3127022 /dev/mmcblk0p28
[  619.207294] btrfs: enabling auto recovery
[  619.207294] btrfs: disk space caching is enabled
[  619.211506] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  619.222890] Btrfs detected SSD devices, enabling SSD mode
[  619.227315] btrfs: unlinked 1 orphans
[  619.227834] btrfs: continuing balance
[  619.298733] btrfs: free space inode generation (0) did not match free space cache generation (62)
[  619.298824] btrfs: free space inode generation (0) did not match free space cache generation (25)
[  619.325591] btrfs: free space inode generation (0) did not match free space cache generation (27)
[  620.667236] btrfs: relocating block group 69035753472 flags 1
[  621.138562] ------------[ cut here ]------------
[  621.138592] WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0x38/0x98()
[  621.138592] btrfs: Transaction aborted
[  621.138623] Modules linked in:
[  621.138653] [<c010b71c>] (unwind_backtrace+0x0/0x118) from [<c017365c>] (warn_slowpath_common+0x4c/0x64)
[  621.138684] [<c017365c>] (warn_slowpath_common+0x4c/0x64) from [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c)
[  621.138684] [<c01736a0>] (warn_slowpath_fmt+0x2c/0x3c) from [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98)
[  621.138715] [<c03250e8>] (__btrfs_abort_transaction+0x38/0x98) from [<c0335308>] (find_free_extent+0x9d4/0xc08)
[  621.138745] [<c0335308>] (find_free_extent+0x9d4/0xc08) from [<c0339188>] (btrfs_reserve_extent+0xe0/0x294)
[  621.138776] [<c0339188>] (btrfs_reserve_extent+0xe0/0x294) from [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec)
[  621.138806] [<c034fa5c>] (__btrfs_prealloc_file_range+0xa8/0x2ec) from [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c)
[  621.138837] [<c035504c>] (btrfs_prealloc_file_range+0x34/0x3c) from [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c)
[  621.138867] [<c0389b2c>] (prealloc_file_extent_cluster+0x13c/0x19c) from [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368)
[  621.138867] [<c0389d00>] (relocate_file_extent_cluster+0x64/0x368) from [<c038a048>] (relocate_data_extent+0x44/0xe0)
[  621.138898] [<c038a048>] (relocate_data_extent+0x44/0xe0) from [<c038eea8>] (relocate_block_group+0x3a4/0x5a0)
[  621.138928] [<c038eea8>] (relocate_block_group+0x3a4/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.138959] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.138989] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.139020] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.139020] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.139050] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.139081] ---[ end trace da227214a82491b9 ]---
[  621.139081] BTRFS error (device mmcblk0p28) in find_free_extent:5803: error 28
**[  621.139111] btrfs is forced readonly**
[  621.143232] btrfs-balance (223): undefined instruction: pc=c038ead4
[  621.143232] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.143293] ------------[ cut here ]------------
[  621.143323] kernel BUG at fs/btrfs/relocation.c:2278!
[  621.143323] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  621.143323] Modules linked in:
[  621.143354] CPU: 1    Tainted: G        W     (3.4.108.20150901.1 #1)
[  621.143354] PC is at merge_reloc_roots+0xf4/0x124
[  621.143384] LR is at btrfs_drop_snapshot+0x540/0x564
[  621.143384] pc : [<c038ead4>]    lr : [<c0339f90>]    psr: a0000013
[  621.143384] sp : ee889d98  ip : 003e003f  fp : ee60bd08
[  621.143415] r10: ee60b800  r9 : ffffffe2  r8 : ee821800
[  621.143415] r7 : fffffe5c  r6 : ee60bcf0  r5 : ee889d98  r4 : ee60b800
[  621.143445] r3 : 271ae970  r2 : 271ae970  r1 : c092cdb8  r0 : ffffffe2
[  621.143445] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  621.143476] Control: 10c5787d  Table: ae9f406a  DAC: 00000015
[  621.143476] 
[  621.143476] PC: 0xc038ea54:
[  621.143506] ea54  e51321c4 e2438fab e3520000 0a00000f e513019c e18320d7 ebfff2e8 e3700a01
[  621.143537] ea74  e1a01000 9a000000 e7f001f2 e590300c e1530008 0a000000 e7f001f2 e1a00004
[  621.143598] ea94  ebfffea2 e3500000 0a000005 e7f001f2 e8930006 e5812004 e5821000 e5833000
[  621.143628] eab4  e5833004 e1a00008 e594100c e3a02000 e3a03001 ebfeabe0 e3500000 aa000000
[  621.143659] ead4  e7f001f2 e3a00001 eaffffd9 e3500000 1affffc4 e59434e8 e3530000 0a000000
[  621.143720] eaf4  e7f001f2 e28dd008 e8bd81f0 fffffe5c e92d4ff0 e24dd044 e3a03000 e1a0a000
[  621.143750] eb14  e58d3018 ebfe61a0 e2506000 0a000159 e3a03001 e1a0000a e5863060 ebffea4d
[  621.143811] eb34  e2509000 1a00014c e28abc05 e28bb008 e59a0004 e3a01000 ebfee44a e2899001
[  621.143842] 
[  621.143842] LR: 0xc0339f10:
[  621.143842] 9f10  eb0025d2 ea000005 e5940000 eb00c663 e5940004 eb00c661 e1a00004 ebfbd45a
[  621.143903] 9f30  e3a0a001 ea000000 e3a0a000 e1a00006 e1a01009 eb0038b0 e1a00007 ebfbd452
[  621.143934] 9f50  e1a00008 ebffb4e3 e35a0000 1a000001 e1a00004 eb003406 e3550000 1375000b
[  621.143995] 9f70  0a000009 e3a03000 e5940110 e58d3000 e3012b91 e59f1024 e1a03005 ebffabd4
[  621.144025] 9f90  ea000001 e3e0500b eafffff0 e1a00005 e28dd04c e8bd8ff0 c1098b98 c0b1e967
[  621.144056] 9fb0  c092cdb8 e92d4ff0 e24dd014 e5915103 e1a06001 e59140ff e3e01000 e1550001
[  621.144117] 9fd0  e58d000c e3e00007 01540000 0a000000 e7f001f2 e1a0b002 e1a07003 ebffb46b
[  621.144147] 9ff0  e2508000 0a000059 e59f216c e5920008 e3500000 0a000007 e3081050 e3a020b8
[  621.144208] 
[  621.144208] SP: 0xee889d18:
[  621.144208] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.144239] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.144300] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.144330] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.144391] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.144422] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.144452] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.144513] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.144544] 
[  621.144544] FP: 0xee60bc88:
[  621.144574] bc88  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144605] bca8  00000000 00000000 00000008 00000000 00000000 00000000 00000020 00000000
[  621.144635] bcc8  00000000 00000000 00000000 00000000 00000000 000a000a 00000000 00000000
[  621.144697] bce8  ee7e6000 00010001 ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000
[  621.144727] bd08  188da000 00000010 00000009 00000000 00000400 00000000 00000000 00000000
[  621.144758] bd28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144819] bd48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144849] bd68  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.144880] 
[  621.144880] R1: 0xc092cd38:
[  621.144910] cd38  65747865 725f746e 5f006665 7274625f 665f7366 5f656572 65747865 6600746e
[  621.144941] cd58  5f646e69 65657266 7478655f 00746e65 66727462 75725f73 65645f6e 6579616c
[  621.145002] cd78  65725f64 77007366 65746972 656e6f5f 6361635f 675f6568 70756f72 72746200
[  621.145032] cd98  725f7366 72657365 655f6576 6e657478 73750074 6c625f65 5f6b636f 00767372
[  621.145063] cdb8  66727462 72645f73 735f706f 7370616e 00746f68 66727462 616d5f73 625f656b
[  621.145124] cdd8  6b636f6c 6f72675f 77007075 5f746961 5f726f66 65726f6d 6665725f 00000073
[  621.145154] cdf8  66727462 70755f73 65746164 6f6f725f 74620074 5f736672 5f646461 746f6f72
[  621.145215] ce18  6665725f 00000000 00000004 00000000 66727462 65645f73 73635f6c 00736d75
[  621.145246] 
[  621.145246] R4: 0xee60b780:
[  621.145246] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.145307] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.145337] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.145368] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.145429] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.145460] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.145521] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.145551] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.145582] 
[  621.145582] R5: 0xee889d18:
[  621.145612] 9d18  271ae970 271ae970 ee60b800 ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2
[  621.145643] 9d38  ee60b800 ee60bd08 003e003f ee889d98 c0339f90 c038ead4 a0000013 ffffffff
[  621.145704] 9d58  ffffffe4 ee889d88 ee607000 000004f8 ee60bd08 c0347cb4 00000001 ee60b800
[  621.145734] 9d78  ee889d98 ee60bcf0 fffffe5c ee821800 ffffffe2 ee60b800 ee60bd08 c038eacc
[  621.145765] 9d98  ee889d98 ee889d98 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c
[  621.145826] 9db8  ffffffff ffffffff 00000001 00000050 00000000 ee60b810 00000000 ee60b800
[  621.145856] 9dd8  ee814000 ee607000 00000001 00354e98 101794e0 a8000000 00f8c000 00000000
[  621.145917] 9df8  ee889df8 ee60b800 ee814000 ee607000 00000001 ee8143e0 00000518 00000510
[  621.145948] 
[  621.145948] R6: 0xee60bc70:
[  621.145948] bc70  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146009] bc90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146039] bcb0  00000008 00000000 00000000 00000000 00000020 00000000 00000000 00000000
[  621.146070] bcd0  00000000 00000000 00000000 000a000a 00000000 00000000 ee7e6000 00010001
[  621.146131] bcf0  ee60bcf0 ee60bcf0 0000e000 00000000 00000000 00000000 188da000 00000010
[  621.146161] bd10  00000009 00000000 00000400 00000000 00000000 00000000 00000000 00000000
[  621.146192] bd30  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146253] bd50  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146284] 
[  621.146284] R7: 0xfffffddc:
[  621.146314] fddc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146345] fdfc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146406] fe1c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146436] fe3c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146497] fe5c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146528] fe7c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146558] fe9c  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146619] febc  ******** ******** ******** ******** ******** ******** ******** ********
[  621.146650] 
[  621.146650] R8: 0xee821780:
[  621.146680] 1780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146711] 17a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146741] 17c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146802] 17e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.146833] 1800  ee394640 ee394640 00000000 00000000 00000001 00000000 00000000 00000000
[  621.146863] 1820  00000003 00000000 00001000 00000000 00000000 00000000 00000001 00000000
[  621.146924] 1840  00000000 000041ed 00000000 00000000 80000000 ffffffff 00000000 00000000
[  621.146955] 1860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  621.147016] 
[  621.147016] R10: 0xee60b780:
[  621.147016] b780  95005127 22e02e20 c1000000 0100d810 28100a00 094091e5 8090c00e 026e4b4a
[  621.147047] b7a0  00791e20 08362034 8c404400 06340824 01c24404 0021000b 40542640 0c400824
[  621.147108] b7c0  41020000 1020110c 615806f0 200901b0 c82cd824 8290010c c0c4820e 92c0b500
[  621.147138] b7e0  5f0808d0 04851519 00c10188 33030004 e140a201 42c21029 0ce17209 43351364
[  621.147199] b800  ee796b40 ee607000 ee35ce10 ee7e6e00 00000000 00000000 00000000 00000000
[  621.147230] b820  00000000 00000000 00000000 00000000 00000000 ee60b834 ee60b834 ee60b83c
[  621.147260] b840  ee60b83c ee60b844 ee60b844 ee60b84c ee60b84c ee60b854 ee60b854 ee60b85c
[  621.147321] b860  ee60b85c ee60b864 ee60b864 ee60b86c ee60b86c ee60b874 ee60b874 ee60b87c
[  621.147352] Process btrfs-balance (pid: 223, stack limit = 0xee8882f0)
[  621.147382] Stack: (0xee889d98 to 0xee88a000)
[  621.147382] 9d80:                                                       ee889d98 ee889d98
[  621.147413] 9da0: 00000000 ee60b884 ee2fb070 ffffffe4 00000000 c038f02c ffffffff ffffffff
[  621.147413] 9dc0: 00000001 00000050 00000000 ee60b810 00000000 ee60b800 ee814000 ee607000
[  621.147443] 9de0: 00000001 00354e98 101794e0 a8000000 00f8c000 00000000 ee889df8 ee60b800
[  621.147443] 9e00: ee814000 ee607000 00000001 ee8143e0 00000518 00000510 00000000 c038f1ec
[  621.147474] 9e20: 00000001 00000000 12da0000 ee814000 00000001 ee33f0c8 ee814000 12da0000
[  621.147504] 9e40: 00000010 ee820400 ee2fb000 c036ea94 ffffffff ee889e98 00000004 c10ac9fc
[  621.147504] 9e60: 00000000 ee33f0c8 ee889f76 ee889ed0 00000001 ffffffff ee2fb000 00000000
[  621.147535] 9e80: 00000003 00000000 ee889ec7 00000227 ee607000 ee33f134 00000100 00000000
[  621.147535] 9ea0: 00000003 00000000 00000000 ee8149d0 ee889edc c019b76c 00000000 ee33f0c8
[  621.147565] 9ec0: 0000097e ee33f0c8 00000008 00000000 ee814000 00000000 ee2fb000 00000000
[  621.147596] 9ee0: 00000001 ee33f0c8 ee814000 12da0000 00000010 ee8149d0 ee2fb000 c0372998
[  621.147596] 9f00: 12da0000 00000010 00000000 0000000c c0000000 00000012 00000001 00000000
[  621.147626] 9f20: 00000001 00000000 12da0000 00000010 c0eec5f0 00000919 2d333000 00000000
[  621.147626] 9f40: c005c600 ee8149e8 00000000 0000097e 00000000 ee820400 00000100 00000000
[  621.147657] 9f60: 00000000 ee8149d4 00000000 00000000 00000000 01004000 00000000 ffe40000
[  621.147688] 9f80: 1052d9ff 00000000 00000001 e4000000 12da0000 00000010 c0b2f59d ee814000
[  621.147688] 9fa0: ee814408 ee8149d4 00000013 00000000 00000000 00000000 00000000 c0372b9c
[  621.147718] 9fc0: ee7f1d28 ee814000 c0372b50 c0191ecc 00000000 ee814000 00000000 00000000
[  621.147718] 9fe0: ee889fe0 ee889fe0 ee7f1d28 c0191e48 c0106758 c0106758 764e1014 e2028008
[  621.147749] [<c038ead4>] (merge_reloc_roots+0xf4/0x124) from [<c038f02c>] (relocate_block_group+0x528/0x5a0)
[  621.147779] [<c038f02c>] (relocate_block_group+0x528/0x5a0) from [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4)
[  621.147810] [<c038f1ec>] (btrfs_relocate_block_group+0x148/0x2a4) from [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688)
[  621.147840] [<c036ea94>] (btrfs_relocate_chunk.isra.12+0x3c/0x688) from [<c0372998>] (btrfs_balance+0xbbc/0xd74)
[  621.147840] [<c0372998>] (btrfs_balance+0xbbc/0xd74) from [<c0372b9c>] (balance_kthread+0x4c/0x6c)
[  621.147871] [<c0372b9c>] (balance_kthread+0x4c/0x6c) from [<c0191ecc>] (kthread+0x84/0x90)
[  621.147901] [<c0191ecc>] (kthread+0x84/0x90) from [<c0106758>] (kernel_thread_exit+0x0/0x8)
[  621.147932] Code: e3a03001 ebfeabe0 e3500000 aa000000 (e7f001f2) 
[  621.147932] ---[ end trace da227214a82491ba ]---

The volume also seems to be somewhat full:


/ # btrfs fi df /mnt/
Data, single: total=13.01GiB, used=10.76GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=158.13MiB
Metadata, single: total=8.00MiB, used=0.00

/ # btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 86180ca0-d351-4551-b262-22b49e1adf47 Total devices 1 FS bytes used 10.91GiB devid 1 size 13.75GiB used 13.74GiB path /dev/mmcblk0p28 Btrfs v3.16

I was also able to do offline btrfs check --repair with no errors in dmesg but it didn't change anything:


/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 4419584 exclusive compressed 4419584
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 4415488 exclusive compressed 4415488
found 7457143994 bytes used err is 0
total csum bytes: 11255852
total tree bytes: 165814272
total fs tree bytes: 141737984
total extent tree bytes: 8568832
btree space waste bytes: 49032690
file data blocks allocated: 11965399040
 referenced 11496439808
 Btrfs v3.16
Due to this, the factory reset script will break when it's trying to mount or umount and so is btrfs-mount-repair. To me, it seeme like as soon as balancing gets triggered, things go wrong. Any ideas how I could reset my device?

overdue update - tl;dr: tl;dr:

I didn't try anything new yet and finally got a new device (I started a new job and couldn't spend any more time on this). this).

I asked a few techies (not Jolla) about their opinion opinion, but it turned out I did already try tried their recommendations like running btrfs repair or rebuilding uuids, so no new insights. ideas. The last thing I might try is to dd the whole volume with an factory image if I can find one. One last thing which came to my mind is that maybe a balance might not have been run properly or not at all before the update, so that _may_ be one possible reason of why the volume is now still "full". Just because I can't really remember and it's nagging me since, but it's rather unlikely that the volume was actually "full" before that. I had some stuff running in /opt tho, but these things were stuffing all their data into nemo homefolder.