Btrfs filesystem read only on error

2014-06-13 Thread David Bloquel
Hi,

Today my btrfs disk suddently turned to read only after than an error
occured, I guess it's a security measure to avoid any corrupted data
after a filesystem error.

Here is the syslog:

Jun 13 04:59:39 nas1 kernel: [110663.709572] btrfs: page allocation
failure: order:1, mode:0x200020
Jun 13 04:59:39 nas1 kernel: [110663.709579] CPU: 3 PID: 21177 Comm:
btrfs Not tainted 3.12-0.bpo.1-amd64 #1 Debian 3.12.9-1~bpo70+1
Jun 13 04:59:39 nas1 kernel: [110663.709581] Hardware name: Supermicro
A1SAi/A1SAi, BIOS 1.0b 11/06/2013
Jun 13 04:59:39 nas1 kernel: [110663.709584]  
0001 814be0b3 00200020
Jun 13 04:59:39 nas1 kernel: [110663.709590]  8112535c
88047ffefb00  00020002
Jun 13 04:59:39 nas1 kernel: [110663.709594]  88047ffefb08
0002  
Jun 13 04:59:39 nas1 kernel: [110663.709599] Call Trace:
Jun 13 04:59:39 nas1 kernel: [110663.709608]  [814be0b3] ?
dump_stack+0x41/0x51
Jun 13 04:59:39 nas1 kernel: [110663.709614]  [8112535c] ?
warn_alloc_failed+0x10c/0x160
Jun 13 04:59:39 nas1 kernel: [110663.709618]  [811292b2] ?
__alloc_pages_nodemask+0x9c2/0xaa0
Jun 13 04:59:39 nas1 kernel: [110663.709623]  [8116d5c5] ?
kmem_getpages+0x65/0x1a0
Jun 13 04:59:39 nas1 kernel: [110663.709627]  [8116efd2] ?
fallback_alloc+0x172/0x260
Jun 13 04:59:39 nas1 kernel: [110663.709631]  [8116f904] ?
kmem_cache_alloc+0x144/0x1f0
Jun 13 04:59:39 nas1 kernel: [110663.709635]  [81281f98] ?
__idr_pre_get+0x68/0x90
Jun 13 04:59:39 nas1 kernel: [110663.709639]  [81282128] ?
ida_pre_get+0x18/0x90
Jun 13 04:59:39 nas1 kernel: [110663.709644]  [81187561] ?
get_anon_bdev+0x21/0xe0
Jun 13 04:59:39 nas1 kernel: [110663.709665]  [a048a768] ?
btrfs_init_fs_root+0xa8/0xf0 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709677]  [a048b32e] ?
btrfs_get_fs_root+0xce/0x220 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709689]  [a048e5fe] ?
create_pending_snapshot+0x6ee/0x980 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709701]  [a048e919] ?
create_pending_snapshots+0x89/0xa0 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709713]  [a048fd1a] ?
btrfs_commit_transaction+0x46a/0x9f0 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709718]  [81082d20] ?
add_wait_queue+0x60/0x60
Jun 13 04:59:39 nas1 kernel: [110663.709731]  [a04bf39d] ?
btrfs_mksubvol.isra.59+0x3cd/0x3f0 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709743]  [a04bf4d0] ?
btrfs_ioctl_snap_create_transid+0x110/0x1a0 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709755]  [a04bf621] ?
btrfs_ioctl_snap_create_v2+0x41/0x140 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709767]  [a04bf6e9] ?
btrfs_ioctl_snap_create_v2+0x109/0x140 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709780]  [a04c2bd2] ?
btrfs_ioctl+0xc32/0x1d30 [btrfs]
Jun 13 04:59:39 nas1 kernel: [110663.709785]  [81151544] ?
mmap_region+0x274/0x600
Jun 13 04:59:39 nas1 kernel: [110663.709790]  [814c75b8] ?
__do_page_fault+0x2b8/0x540
Jun 13 04:59:39 nas1 kernel: [110663.709795]  [811971ca] ?
do_vfs_ioctl+0x8a/0x4f0
Jun 13 04:59:39 nas1 kernel: [110663.709799]  [811976d0] ?
SyS_ioctl+0xa0/0xc0
Jun 13 04:59:39 nas1 kernel: [110663.709803]  [814cb7b9] ?
system_call_fastpath+0x16/0x1b
 Jun 13 04:59:39 nas1 kernel: [110663.709805] Mem-Info:
Jun 13 04:59:39 nas1 kernel: [110663.709807] Node 0 DMA per-cpu:
Jun 13 04:59:39 nas1 kernel: [110663.709810] CPU0: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709812] CPU1: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709814] CPU2: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709816] CPU3: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709818] CPU4: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709820] CPU5: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709822] CPU6: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709824] CPU7: hi:0, btch:
  1 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709825] Node 0 DMA32 per-cpu:
Jun 13 04:59:39 nas1 kernel: [110663.709828] CPU0: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709830] CPU1: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709832] CPU2: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709834] CPU3: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709836] CPU4: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709838] CPU5: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709840] CPU6: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709842] CPU7: hi:  186, btch:
 31 usd:   0
Jun 13 04:59:39 nas1 kernel: [110663.709844] 

Re: Btrfs filesystem read only on error

2014-06-13 Thread Duncan
David Bloquel posted on Fri, 13 Jun 2014 12:51:32 +0200 as excerpted:

 Informations about my system:
 Linux nas1 3.12-0.bpo.1-amd64 #1 SMP Debian 3.12.9-1~bpo70+1
 (2014-02-07)
 x86_64 GNU/Linux brtfs version:
 Btrfs v0.19

Yikes, that's old!  Particularly the 0.19 btrfs-progs, tho there have 
been a lot of kernel btrfs fixes since the 3.12 series as well, not all 
of which will have been backported.

Due to the rate of fixes going into btrfs, users are strongly recommended 
to keep up with current stable kernels, now 3.15, and not get /too/ far 
behind on btrfs-progs either.

I'm actually a bit behind myself ATM as I've been focused on other 
things, kernel from git but not rebuild since 3.14, and btrfs-progs from 
git at v3.14.2.  I'd recommend kernel 3.14 if not 3.15, and a btrfs-progs 
no older than 3.12.  I think there are some snapshotting fixes in kernel 
3.15 so you'll probably want that given the snapshotting you report 
doing.  (I do little snapshotting and 3.14 has been pretty stable for me, 
the reason I've let myself get a bit behind, what with other things I 
have been doing.)

-- 
Duncan - List replies preferred.   No HTML msgs.
Every nonfree program has a lord, a master --
and if you use the program, he is your master.  Richard Stallman

--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html