From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: oops in btrfs_reserve_extent (v0.16) Date: Sun, 28 Sep 2008 23:42:00 +0300 Message-ID: <48DFEC18.6070303@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed To: linux-btrfs@vger.kernel.org Return-path: List-ID: Perhaps a bit optimistically I started moving my home directory to btrfs, using v0.16. Midway through the rsync I noticed the 10GB lvm volume would be too small for a filesystem with no -ENOSPC support, so I extended the volume and resized the filesystem while rsync was running. The punishment for this arrived almost immediately: new size for /dev/mapper/vg0-home.btrfs is 21474836480 Unable to find block group for 8619294720 ------------[ cut here ]------------ WARNING: at /home/avi/btrfs/btrfs-0.16/extent-tree.c:300 find_search_start+0x1d9/0x27e [btrfs]() (Not tainted) Modules linked in: btrfs ... Pid: 31165, comm: pdflush Not tainted 2.6.26.3-29.fc9.x86_64 #1 Call Trace: [] warn_on_slowpath+0x60/0xa3 [] ? printk+0x67/0x6a [] ? :btrfs:get_state_private+0x6b/0x79 [] ? :btrfs:btrfs_lookup_block_group+0x3b/0x73 [] ? :btrfs:find_first_extent_bit_state+0x23/0x5e [] :btrfs:find_search_start+0x1d9/0x27e [] ? :btrfs:get_state_private+0x6b/0x79 [] :btrfs:find_free_extent+0x334/0x5ff [] :btrfs:__btrfs_reserve_extent+0x1a9/0x23a [] :btrfs:btrfs_reserve_extent+0x5e/0x79 [] :btrfs:cow_file_range+0x11d/0x23e [] :btrfs:run_delalloc_range+0x2cc/0x2e2 [] ? :btrfs:find_lock_delalloc_range+0x205/0x218 [] ? getnstimeofday+0x3a/0x96 [] :btrfs:__extent_writepage+0x169/0x5b6 [] ? find_get_pages_tag+0x3d/0x95 [] write_cache_pages+0x1c5/0x314 [] ? :btrfs:__extent_writepage+0x0/0x5b6 [] :btrfs:extent_writepages+0x32/0x52 [] ? :btrfs:btrfs_get_extent+0x0/0x74f [] :btrfs:btrfs_writepages+0x23/0x25 [] do_writepages+0x28/0x38 [] __writeback_single_inode+0x16d/0x2cc [] ? :dm_mod:dm_any_congested+0x43/0x52 [] sync_sb_inodes+0x20b/0x2d0 [] writeback_inodes+0xa8/0x100 [] wb_kupdate+0xa3/0x119 [] pdflush+0x148/0x1f7 [] ? wb_kupdate+0x0/0x119 [] ? pdflush+0x0/0x1f7 [] kthread+0x49/0x76 [] child_rip+0xa/0x12 [] ? kthread+0x0/0x76 [] ? child_rip+0x0/0x12 and allocation failed flags 1 ------------[ cut here ]------------ kernel BUG at /home/avi/btrfs/btrfs-0.16/extent-tree.c:2111! invalid opcode: 0000 [1] SMP CPU 0 Modules linked in: btrfs ... Pid: 31165, comm: pdflush Tainted: G W 2.6.26.3-29.fc9.x86_64 #1 RIP: 0010:[] [] :btrfs:__btrfs_reserve_extent+0x1ff/0x23a RSP: 0018:ffff81005f095860 EFLAGS: 00010286 RAX: 000000000000001d RBX: 0000000000000001 RCX: ffff81005e487e60 RDX: 0000000100000000 RSI: ffff81005f0956d0 RDI: 0000000000000246 RBP: ffff81005f0958d0 R08: ffffffff813d2db0 R09: ffff810001019798 R10: 00004bd3179bd155 R11: 0000000000000000 R12: ffff8100256ea000 R13: ffff81003722f000 R14: 0000000000001000 R15: ffff81003e1926c8 FS: 0000000000000000(0000) GS:ffffffff81417000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 00000031c032e830 CR3: 000000007a40a000 CR4: 00000000000026e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process pdflush (pid: 31165, threadinfo ffff81005f094000, task ffff810018b2da80) Stack: 0000000000000000 ffff81005f095990 0000000000000000 0000000000000000 0000000000000001 0000000000000246 0000000000000000 0000000000000000 0000000000001000 0000000000000000 ffff81003722f000 0000000000000000 Call Trace: [] :btrfs:btrfs_reserve_extent+0x5e/0x79 [] :btrfs:cow_file_range+0x11d/0x23e [] :btrfs:run_delalloc_range+0x2cc/0x2e2 [] ? :btrfs:find_lock_delalloc_range+0x205/0x218 [] ? getnstimeofday+0x3a/0x96 [] :btrfs:__extent_writepage+0x169/0x5b6 [] ? find_get_pages_tag+0x3d/0x95 [] write_cache_pages+0x1c5/0x314 [] ? :btrfs:__extent_writepage+0x0/0x5b6 [] :btrfs:extent_writepages+0x32/0x52 [] ? :btrfs:btrfs_get_extent+0x0/0x74f [] :btrfs:btrfs_writepages+0x23/0x25 [] do_writepages+0x28/0x38 [] __writeback_single_inode+0x16d/0x2cc [] ? :dm_mod:dm_any_congested+0x43/0x52 [] sync_sb_inodes+0x20b/0x2d0 [] writeback_inodes+0xa8/0x100 [] wb_kupdate+0xa3/0x119 [] pdflush+0x148/0x1f7 [] ? wb_kupdate+0x0/0x119 [] ? pdflush+0x0/0x1f7 [] kthread+0x49/0x76 [] child_rip+0xa/0x12 [] ? kthread+0x0/0x76 [] ? child_rip+0x0/0x12 Code: 85 08 01 00 00 4c 89 f2 48 8b 70 20 e8 0d f5 ff ff e9 91 fe ff ff 85 c0 74 15 48 89 de 48 c7 c7 f1 bc 51 a0 31 c0 e8 03 40 da e0 <0f> 0b eb fe 48 8b 45 18 49 8b bd 08 01 00 00 b9 50 00 00 00 48 RIP [] :btrfs:__btrfs_reserve_extent+0x1ff/0x23a The 'Unable to find block group' perhaps indicate the firesystem was resized beyond the blockdev's limits? Or is online resizing broken? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.