From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tommy Faasen Subject: Btrfs out of inodes becomes corrupt Date: Sun, 05 Feb 2012 19:18:59 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: Return-path: List-ID: Hi, I have a btrfs partition that mainly hosts large files between 1 and 10 GB's. It's about 2.5TB and had about 40GB free. According to df -i it had 0 inodes left. I tried deleting a file I tried echo >/path/to/file Both resulting in a disk full error Trying to remount with the option compress also didn't help. This al under debian with kernel 2.6.32-5. I tried to mount the partition under linux mint which has kernel 3.0.x. This went intially ok, but after a very long btrfsck when I try to mount now I get a segfault in the kernel and the filesystem can no longer be mounted. Is there anything I can do or just format it and look for backups? This happends under debian as well as under linux mint: Here is the output of linux mint mint # btrfsck usage: btrfsck dev Btrfs Btrfs v0.19 mint it0 # btrfsck /dev/vda1 found 2749144604672 bytes used err is 0 total csum bytes: 2681448928 total tree bytes: 3340902400 total fs tree bytes: 290160640 btree space waste bytes: 253130450 file data blocks allocated: 2746011525120 referenced 2745610993664 kernel output [11138.535482] device fsid 808bddf9-a2c5-4121-814f-ebbf4ec7d50c devid 1 transid 11368 /dev/vda1 [11276.469967] ------------[ cut here ]------------ [11276.469980] WARNING: at /build/buildd/linux-3.0.0/fs/btrfs/extent-tree.c:5693 use_block_rsv+0xc0/0x170 [btrfs]() [11276.469982] Hardware name: Bochs [11276.469983] Modules linked in: btrfs zlib_deflate libcrc32c nls_utf8 isofs rfcomm bnep bluetooth parport_pc ppdev dm_crypt joydev binfmt_misc psmouse serio_raw i2c_piix4 lp parport usbhid hid virtio_net virtio_blk floppy virtio_pci virtio_ring virtio [11276.469999] Pid: 2160, comm: mount Not tainted 3.0.0-13-generic #22-Ubuntu [11276.470001] Call Trace: [11276.470016] [] warn_slowpath_common+0x7f/0xc0 [11276.470019] [] warn_slowpath_null+0x1a/0x20 [11276.470025] [] use_block_rsv+0xc0/0x170 [btrfs] [11276.470031] [] btrfs_alloc_free_block+0x3d/0x200 [btrfs] [11276.470040] [] ? btrfs_key_blockptr+0xe5/0xf0 [btrfs] [11276.470045] [] __btrfs_cow_block+0x14c/0x5b0 [btrfs] [11276.470050] [] btrfs_cow_block+0x113/0x260 [btrfs] [11276.470053] [] ? _raw_spin_lock+0xe/0x20 [11276.470058] [] btrfs_search_slot+0x2b1/0x550 [btrfs] [11276.470064] [] lookup_inline_extent_backref+0x89/0x450 [btrfs] [11276.470069] [] lookup_extent_backref+0x60/0xf0 [btrfs] [11276.470074] [] __btrfs_free_extent+0xbf/0x650 [btrfs] [11276.470079] [] run_delayed_tree_ref+0x114/0x1a0 [btrfs] [11276.470085] [] run_one_delayed_ref+0xae/0xf0 [btrfs] [11276.470091] [] run_clustered_refs+0xd4/0x240 [btrfs] [11276.470096] [] btrfs_run_delayed_refs+0xca/0x220 [btrfs] [11276.470103] [] __btrfs_end_transaction+0x85/0x320 [btrfs] [11276.470111] [] btrfs_end_transaction+0x15/0x20 [btrfs] [11276.470121] [] btrfs_evict_inode+0x1e0/0x270 [btrfs] [11276.470134] [] evict+0x91/0x170 [11276.470137] [] iput_final+0xd2/0x1a0 [11276.470139] [] iput+0x38/0x50 [11276.470145] [] btrfs_orphan_cleanup+0x1ec/0x360 [btrfs] [11276.470151] [] open_ctree+0x1469/0x1760 [btrfs] [11276.470156] [] btrfs_fill_super.isra.38+0x78/0x150 [btrfs] [11276.470167] [] ? disk_name+0x61/0xc0 [11276.470174] [] ? strlcpy+0x47/0x60 [11276.470179] [] btrfs_mount+0x3c6/0x470 [btrfs] [11276.470182] [] mount_fs+0x43/0x1b0 [11276.470186] [] vfs_kern_mount+0x6a/0xc0 [11276.470188] [] do_kern_mount+0x54/0x110 [11276.470190] [] do_mount+0x1a4/0x260 [11276.470192] [] sys_mount+0x90/0xe0 [11276.470196] [] system_call_fastpath+0x16/0x1b [11276.470197] ---[ end trace eeca3fbe2d1be463 ]--- [11276.470256] ------------[ cut here ]------------ [11276.470262] WARNING: at /build/buildd/linux-3.0.0/fs/btrfs/extent-tree.c:5693 use_block_rsv+0xc0/0x170 [btrfs]() [11276.470263] Hardware name: Bochs [11276.470264] Modules linked in: btrfs zlib_deflate libcrc32c nls_utf8 isofs rfcomm bnep bluetooth parport_pc ppdev dm_crypt joydev binfmt_misc psmouse serio_raw i2c_piix4 lp parport usbhid hid virtio_net virtio_blk floppy virtio_pci virtio_ring virtio [11276.470275] Pid: 2160, comm: mount Tainted: G W 3.0.0-13-generic #22-Ubuntu [11276.470276] Call Trace: [11276.470278] [] warn_slowpath_common+0x7f/0xc0 [11276.470280] [] warn_slowpath_null+0x1a/0x20 [11276.470285] [] use_block_rsv+0xc0/0x170 [btrfs] [11276.470291] [] btrfs_alloc_free_block+0x3d/0x200 [btrfs] [11276.470299] [] ? btrfs_key_blockptr+0xe5/0xf0 [btrfs] [11276.470304] [] __btrfs_cow_block+0x14c/0x5b0 [btrfs] [11276.470308] [] btrfs_cow_block+0x113/0x260 [btrfs] [11276.470311] [] ? _raw_spin_lock+0xe/0x20 [11276.470316] [] btrfs_search_slot+0x2b1/0x550 [btrfs] [11276.470321] [] lookup_inline_extent_backref+0x89/0x450 [btrfs] [11276.470326] [] lookup_extent_backref+0x60/0xf0 [btrfs] [11276.470331] [] __btrfs_free_extent+0xbf/0x650 [btrfs] [11276.470337] [] run_delayed_tree_ref+0x114/0x1a0 [btrfs] [11276.470342] [] run_one_delayed_ref+0xae/0xf0 [btrfs] [11276.470348] [] run_clustered_refs+0xd4/0x240 [btrfs] [11276.470353] [] btrfs_run_delayed_refs+0xca/0x220 [btrfs] [11276.470359] [] __btrfs_end_transaction+0x85/0x320 [btrfs] [11276.470365] [] btrfs_end_transaction+0x15/0x20 [btrfs] [11276.470373] [] btrfs_evict_inode+0x1e0/0x270 [btrfs] [11276.470377] [] evict+0x91/0x170 [11276.470380] [] iput_final+0xd2/0x1a0 [11276.470383] [] iput+0x38/0x50 [11276.470392] [] btrfs_orphan_cleanup+0x1ec/0x360 [btrfs] [11276.470399] [] open_ctree+0x1469/0x1760 [btrfs] [11276.470404] [] btrfs_fill_super.isra.38+0x78/0x150 [btrfs] [11276.470406] [] ? disk_name+0x61/0xc0 [11276.470408] [] ? strlcpy+0x47/0x60 [11276.470412] [] btrfs_mount+0x3c6/0x470 [btrfs] [11276.470414] [] mount_fs+0x43/0x1b0 [11276.470416] [] vfs_kern_mount+0x6a/0xc0 [11276.470418] [] do_kern_mount+0x54/0x110 [11276.470420] [] do_mount+0x1a4/0x260 [11276.470422] [] sys_mount+0x90/0xe0 [11276.470425] [] system_call_fastpath+0x16/0x1b [11276.470426] ---[ end trace eeca3fbe2d1be464 ]--- [11276.470438] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [11276.470441] IP: [] btrfs_print_leaf+0x31/0x590 [btrfs] [11276.470448] PGD 3b3c9067 PUD 3d27c067 PMD 0 [11276.470451] Oops: 0000 [#1] SMP [11276.470453] CPU 1 [11276.470454] Modules linked in: btrfs zlib_deflate libcrc32c nls_utf8 isofs rfcomm bnep bluetooth parport_pc ppdev dm_crypt joydev binfmt_misc psmouse serio_raw i2c_piix4 lp parport usbhid hid virtio_net virtio_blk floppy virtio_pci virtio_ring virtio [11276.470466] [11276.470467] Pid: 2160, comm: mount Tainted: G W 3.0.0-13-generic #22-Ubuntu Bochs Bochs [11276.470470] RIP: 0010:[] [] btrfs_print_leaf+0x31/0x590 [btrfs] [11276.470476] RSP: 0018:ffff880035d9f6c8 EFLAGS: 00010286 [11276.470478] RAX: 00000000ffffffe4 RBX: ffff880031faf090 RCX: 0000000000000000 [11276.470479] RDX: 0000000000000008 RSI: 0000000000000000 RDI: ffff88003bfc6000 [11276.470481] RBP: ffff880035d9f748 R08: 0000000000000000 R09: 0000000000000000 [11276.470482] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000007 [11276.470484] R13: ffff880035d9e000 R14: 0000000000001000 R15: 00000000ffffffe4 [11276.470486] FS: 00007fa101e48820(0000) GS:ffff88003fd00000(0000) knlGS:0000000000000000 [11276.470487] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [11276.470489] CR2: 0000000000000030 CR3: 0000000036b16000 CR4: 00000000000006e0 [11276.470493] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [11276.470497] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [11276.470499] Process mount (pid: 2160, threadinfo ffff880035d9e000, task ffff880039bac560) [11276.470500] Stack: [11276.470501] ffff88003bfc6000 ffff880002886000 ffff880035d9f748 ffffffffa014e1b0 [11276.470503] 0000000000000000 0000000000000007 0000000000000000 0000000000000000 [11276.470506] 0000000000000000 ffff880002886000 0000000000000007 ffff880031faf090 [11276.470508] Call Trace: [11276.470513] [] ? lookup_extent_backref+0x60/0xf0 [btrfs] [11276.470519] [] __btrfs_free_extent+0x59f/0x650 [btrfs] [11276.470524] [] run_delayed_tree_ref+0x114/0x1a0 [btrfs] [11276.470530] [] run_one_delayed_ref+0xae/0xf0 [btrfs] [11276.470535] [] run_clustered_refs+0xd4/0x240 [btrfs] [11276.470540] [] btrfs_run_delayed_refs+0xca/0x220 [btrfs] [11276.470547] [] __btrfs_end_transaction+0x85/0x320 [btrfs] [11276.470553] [] btrfs_end_transaction+0x15/0x20 [btrfs] [11276.470559] [] btrfs_evict_inode+0x1e0/0x270 [btrfs] [11276.470561] [] evict+0x91/0x170 [11276.470564] [] iput_final+0xd2/0x1a0 [11276.470566] [] iput+0x38/0x50 [11276.470571] [] btrfs_orphan_cleanup+0x1ec/0x360 [btrfs] [11276.470578] [] open_ctree+0x1469/0x1760 [btrfs] [11276.470582] [] btrfs_fill_super.isra.38+0x78/0x150 [btrfs] [11276.470585] [] ? disk_name+0x61/0xc0 [11276.470587] [] ? strlcpy+0x47/0x60 [11276.470591] [] btrfs_mount+0x3c6/0x470 [btrfs] [11276.470593] [] mount_fs+0x43/0x1b0 [11276.470595] [] vfs_kern_mount+0x6a/0xc0 [11276.470597] [] do_kern_mount+0x54/0x110 [11276.470599] [] do_mount+0x1a4/0x260 [11276.470601] [] sys_mount+0x90/0xe0 [11276.470604] [] system_call_fastpath+0x16/0x1b [11276.470605] Code: c4 80 48 89 5d d8 4c 89 65 e0 4c 89 6d e8 4c 89 75 f0 4c 89 7d f8 66 66 66 66 90 65 4c 8b 2c 25 48 cd 00 00 49 81 ed d8 1f 00 00 [11276.470618] 8b 46 30 48 89 f3 41 83 45 1c 01 48 ba 00 00 00 00 00 16 00 [11276.470624] RIP [] btrfs_print_leaf+0x31/0x590 [btrfs] [11276.470633] RSP [11276.470634] CR2: 0000000000000030 [11276.470637] ---[ end trace eeca3fbe2d1be465 ]--- Output under debian [ 186.327208] WARNING: at /tmp/buildd/linux-2.6-2.6.32/debian/build/source_amd64_none/fs/btrfs/extent_io.c:3209 __btrfs_cow_block+0x355/0x376 [btrfs]() [ 186.327880] Hardware name: Bochs [ 186.328167] Modules linked in: nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi loop snd_pcm snd_timer snd soundcore snd_page_alloc i2c_piix4 joydev i2c_core psmouse pcspkr processor button serio_raw evdev ext3 jbd mbcache btrfs zlib_deflate crc32c libcrc32c usbhid hid sg sr_mod cdrom ata_generic virtio_blk uhci_hcd ehci_hcd ata_piix libata usbcore nls_base virtio_pci virtio_ring virtio e1000 thermal thermal_sys floppy scsi_mod [last unloaded: scsi_wait_scan] [ 186.333630] Pid: 927, comm: btrfs-transacti Tainted: G D W 2.6.32-5-amd64 #1 [ 186.334168] Call Trace: [ 186.334425] [] ? __btrfs_cow_block+0x355/0x376 [btrfs] [ 186.334793] [] ? __btrfs_cow_block+0x355/0x376 [btrfs] [ 186.335168] [] ? warn_slowpath_common+0x77/0xa3 [ 186.335510] [] ? __btrfs_cow_block+0x355/0x376 [btrfs] [ 186.335905] [] ? btrfs_buffer_uptodate+0x39/0x46 [btrfs] [ 186.336286] [] ? btrfs_cow_block+0xee/0xfd [btrfs] [ 186.336655] [] ? btrfs_search_slot+0x13f/0x502 [btrfs] [ 186.337052] [] ? lookup_inline_extent_backref+0xf5/0x40e [btrfs] [ 186.337735] [] ? block_group_cache_tree_search+0x15/0x8b [btrfs] [ 186.338285] [] ? __btrfs_free_extent+0xde/0x6d7 [btrfs] [ 186.338693] [] ? update_block_group+0x1ad/0x1c7 [btrfs] [ 186.339069] [] ? run_one_delayed_ref+0x4a1/0x4ba [btrfs] [ 186.339430] [] ? __slab_free+0x7f/0x27a [ 186.339781] [] ? run_clustered_refs+0x26c/0x298 [btrfs] [ 186.340172] [] ? run_clustered_refs+0x259/0x298 [btrfs] [ 186.340530] [] ? btrfs_find_ref_cluster+0x96/0x13d [btrfs] [ 186.340923] [] ? btrfs_run_delayed_refs+0xca/0x16e [btrfs] [ 186.341323] [] ? btrfs_commit_transaction+0x7e/0x605 [btrfs] [ 186.342073] [] ? start_transaction+0x24/0x126 [btrfs] [ 186.342435] [] ? autoremove_wake_function+0x0/0x2e [ 186.342796] [] ? transaction_kthread+0x16b/0x1ea [btrfs] [ 186.343173] [] ? __wake_up_common+0x44/0x72 [ 186.343503] [] ? transaction_kthread+0x0/0x1ea [btrfs] [ 186.343882] [] ? kthread+0x79/0x81 [ 186.344222] [] ? child_rip+0xa/0x20 [ 186.344529] [] ? kthread+0x0/0x81 [ 186.344865] [] ? child_rip+0x0/0x20 [ 186.345205] ---[ end trace d3bbb07fcabe45e0 ]--- [ 186.345762] ------------[ cut here ]------------ [ 186.346100] WARNING: at /tmp/buildd/linux-2.6-2.6.32/debian/build/source_amd64_none/fs/btrfs/extent_io.c:3209 pin_down_bytes+0xec/0x11e [btrfs]() [ 186.346749] Hardware name: Bochs [ 186.347033] Modules linked in: nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi loop snd_pcm snd_timer snd soundcore snd_page_alloc i2c_piix4 joydev i2c_core psmouse pcspkr processor button serio_raw evdev ext3 jbd mbcache btrfs zlib_deflate crc32c libcrc32c usbhid hid sg sr_mod cdrom ata_generic virtio_blk uhci_hcd ehci_hcd ata_piix libata usbcore nls_base virtio_pci virtio_ring virtio e1000 thermal thermal_sys floppy scsi_mod [last unloaded: scsi_wait_scan] [ 186.368133] Pid: 927, comm: btrfs-transacti Tainted: G D W 2.6.32-5-amd64 #1 [ 186.368662] Call Trace: [ 186.368932] [] ? pin_down_bytes+0xec/0x11e [btrfs] [ 186.369318] [] ? pin_down_bytes+0xec/0x11e [btrfs] [ 186.369738] [] ? warn_slowpath_common+0x77/0xa3 [ 186.370107] [] ? pin_down_bytes+0xec/0x11e [btrfs] [ 186.370449] [] ? __btrfs_free_extent+0x5b2/0x6d7 [btrfs] [ 186.370842] [] ? update_block_group+0x1ad/0x1c7 [btrfs] [ 186.371208] [] ? run_one_delayed_ref+0x4a1/0x4ba [btrfs] [ 186.371583] [] ? __slab_free+0x7f/0x27a [ 186.371924] [] ? run_clustered_refs+0x26c/0x298 [btrfs] [ 186.372306] [] ? run_clustered_refs+0x259/0x298 [btrfs] [ 186.372752] [] ? btrfs_find_ref_cluster+0x96/0x13d [btrfs] [ 186.373168] [] ? btrfs_run_delayed_refs+0xca/0x16e [btrfs] [ 186.373668] [] ? btrfs_commit_transaction+0x7e/0x605 [btrfs] [ 186.374210] [] ? start_transaction+0x24/0x126 [btrfs] [ 186.374581] [] ? autoremove_wake_function+0x0/0x2e [ 186.374941] [] ? transaction_kthread+0x16b/0x1ea [btrfs] [ 186.375301] [] ? __wake_up_common+0x44/0x72 [ 186.375640] [] ? transaction_kthread+0x0/0x1ea [btrfs] [ 186.376009] [] ? kthread+0x79/0x81 [ 186.376334] [] ? child_rip+0xa/0x20 [ 186.376658] [] ? kthread+0x0/0x81 [ 186.376987] [] ? child_rip+0x0/0x20 [ 186.377334] ---[ end trace d3bbb07fcabe45e1 ]--- I'm not subscribed to this mailinglist, so please email me directly if you have any questions. Regards, Tommy