From patchwork Mon May 23 19:51:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 809972 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4NJq9Mu023790 for ; Mon, 23 May 2011 19:52:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756817Ab1EWTwH (ORCPT ); Mon, 23 May 2011 15:52:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2361 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756775Ab1EWTwE (ORCPT ); Mon, 23 May 2011 15:52:04 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4NJq2Ef011504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 May 2011 15:52:02 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4NJq1QP012718; Mon, 23 May 2011 15:52:01 -0400 Received: from localhost.localdomain (vpn-9-27.rdu.redhat.com [10.11.9.27]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p4NJpvuH027450; Mon, 23 May 2011 15:51:57 -0400 Message-ID: <4DDABADD.7090209@redhat.com> Date: Mon, 23 May 2011 15:51:57 -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: Elric Milon CC: linux-btrfs Subject: Re: kernel BUG at fs/btrfs/inode.c:149! References: <201105051954.48405.whirm@gmx.com> <201105161701.11645.truewhirm@yahoo.es> <4DD150C1.2090505@redhat.com> <201105231357.41588.whirm@gmx.com> In-Reply-To: <201105231357.41588.whirm@gmx.com> X-Enigmail-Version: 1.1.2 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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 (demeter1.kernel.org [140.211.167.41]); Mon, 23 May 2011 19:52:09 +0000 (UTC) On 05/23/2011 07:57 AM, Elric Milon wrote: > On Monday 16 May 2011 18:28:49 you wrote: >> On 05/16/2011 11:01 AM, Whirm wrote: >>> On Monday 16 May 2011 16:11:19 Josef Bacik wrote: > >>> >>> Sorry yes, I meant this is how I managed to get the corrupted filesystem. >>> >>> Ill try to break it again. >> >> Oh ok perfect, yeah I will try and do the same sort of things and see if >> I can get it to happen as well. Thanks, > > Great, btw, I tried to see if I can mount the corrupted filesystem with > the patch you told me about applied, and it fails, here's the log: > > http://pastebin.com/raw.php?i=4Kfv927B > > That happens using 2.6.39-rc7+ from git with the following patch applied (its > the debug patch and the possible fix you told me about): > Ok so this is a different kind of corruption, wooo! Can you apply this debug patch and get me the output so we can try and fix this bit? Thanks, Josef err = ret; --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index cd5e82e..54a8df5 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -365,6 +365,9 @@ next_slot: extent_end = key.offset + btrfs_file_extent_inline_len(leaf, fi); } else { + printk(KERN_ERR "Weird entry at slot=%d, type=%lu\n", + path->slots[0], extent_type); + btrfs_print_leaf(root, leaf); WARN_ON(1); extent_end = search_start; } diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index dc8fb2b..f951053 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -145,6 +145,9 @@ static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, inode_add_bytes(inode, size); ret = btrfs_insert_empty_item(trans, root, path, &key, datasize); + if (ret) + printk(KERN_ERR "ret=%d, inode=%d, start=%llu, size=%llu\n", + ret, inode->i_ino, start, size); BUG_ON(ret); if (ret) {