From patchwork Wed May 4 18:21:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 754522 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p44IM0kK018429 for ; Wed, 4 May 2011 18:22:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755288Ab1EDSV6 (ORCPT ); Wed, 4 May 2011 14:21:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29868 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755153Ab1EDSV5 (ORCPT ); Wed, 4 May 2011 14:21:57 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p44ILtDB009968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 4 May 2011 14:21:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p44ILtfp031641; Wed, 4 May 2011 14:21:55 -0400 Received: from localhost.localdomain (vpn-9-117.rdu.redhat.com [10.11.9.117]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p44ILsR4023757; Wed, 4 May 2011 14:21:54 -0400 Message-ID: <4DC19942.5010505@redhat.com> Date: Wed, 04 May 2011 14:21:54 -0400 From: Josef Bacik User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: whirm@gmx.com CC: linux-btrfs Subject: Re: kernel BUG at fs/btrfs/inode.c:149! References: <201105041626.36039.whirm@gmx.com> <4DC166D4.4000801@redhat.com> <201105041943.31809.whirm@gmx.com> In-Reply-To: <201105041943.31809.whirm@gmx.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 04 May 2011 18:22:01 +0000 (UTC) On 05/04/2011 01:43 PM, whirm@gmx.com wrote: > On Wednesday 04 May 2011 16:46:44 Josef Bacik wrote: >> On 05/04/2011 10:26 AM, whirm@gmx.com wrote: >>> Hi all, >>> >>> Here's a traceback from a failed attempt to mount a btrfs in lvm in luks >>> filesystem. >>> >>> Note that if I mount it readonly it mounts successfully (haven't tried to >>> recover any data as I have recent backups). >>> >>> Yesterday I defragmented both / and /home with: >>> >>> find /home -xdev -type f -print0 | xargs -0 sudo ./btrfs filesystem >>> defragment -c >>> >>> with btrfs-tools v0.19-35-g1b444cd and rebooted a couple of times. And >>> today I got this traceback while trying to mount home at boot time (/ is >>> working ok) >>> >>> btrfsck fails with the following error: >>> >>> couldn't open because of unsupported option features (8). >>> btrfsck: disk-io.c:682: open_ctree_fd: Assertion `!(1)' failed. >>> >>> I'm using a 2.6.39-rc5+ kernel from Linus' tree. >>> >>> If someone needs any extra info, just ask for it, Ill keep the corrupted >>> filesystem for a few days before destroying it. >>> >>> Thanks. >> >> I just posted a patch for this, please try >> >> [PATCH] Btrfs: fix how we do space reservation for truncate >> >> thanks, >> >> Josef > > Still getting the same traceback when trying to mount the filesystem (see file > attached). Argh sorry I was looking at the wrong part of that warning. Can you run with this debug patch and send me the log? Thanks, Josef diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 1bcbe76..236a938 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -417,6 +417,8 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, } if (entry->type == BTRFS_FREE_SPACE_EXTENT) { + printk(KERN_ERR "adding extent [%llu-%llu]\n", + e->offset, e->bytes); spin_lock(&block_group->tree_lock); ret = link_free_space(block_group, e); spin_unlock(&block_group->tree_lock); @@ -431,6 +433,8 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, page_cache_release(page); goto free_cache; } + printk(KERN_ERR "adding bitmap [%llu-%llu]\n", + e->offset, e->bytes); spin_lock(&block_group->tree_lock); ret = link_free_space(block_group, e); block_group->total_bitmaps++;