From patchwork Tue Apr 30 17:53:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 2505901 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4897F40206 for ; Tue, 30 Apr 2013 17:54:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932445Ab3D3Rx5 (ORCPT ); Tue, 30 Apr 2013 13:53:57 -0400 Received: from dkim2.fusionio.com ([66.114.96.54]:59668 "EHLO dkim2.fusionio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932421Ab3D3Rxz (ORCPT ); Tue, 30 Apr 2013 13:53:55 -0400 Received: from mx1.fusionio.com (unknown [10.101.1.160]) by dkim2.fusionio.com (Postfix) with ESMTP id 39A529A0691 for ; Tue, 30 Apr 2013 11:53:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com; s=default; t=1367344435; bh=3iyBPv1xYB7HTC6ODcspN8ZZP5jbhr8ig7BB8fYlaRI=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=Tj0i4DeNn6Zhmd7AfLdI2H0EY9ih5EM4/bI56x/xGV8ChUWUqv6RrL49VqLTZ9WX3 cH9pyW3audefScNS+iW6mr3M9v0sw9zQIb4jj5i79QMN2uClPUfLTyA7qKWDCAHDcf OTVy4cCBLk1ykjyUgE4ZumXDc5oo8z76QDhM5Agc= X-ASG-Debug-ID: 1367344434-03d6a5737d3cbe0001-6jHSXT Received: from mail1.int.fusionio.com (mail1.int.fusionio.com [10.101.1.21]) by mx1.fusionio.com with ESMTP id J8IVDFEoDoNzLogo (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Tue, 30 Apr 2013 11:53:54 -0600 (MDT) X-Barracuda-Envelope-From: JBacik@fusionio.com Received: from localhost (76.182.72.146) by mail.fusionio.com (10.101.1.19) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 30 Apr 2013 11:53:52 -0600 Date: Tue, 30 Apr 2013 13:53:51 -0400 From: Josef Bacik To: Alexander Skwar CC: Josef Bacik , "linux-btrfs@vger.kernel.org" Subject: Re: WARNING: at fs/btrfs/free-space-cache.c:921 __btrfs_write_out_cache+0x6b9/0x9a0 [btrfs]() Message-ID: <20130430175351.GF2580@localhost.localdomain> X-ASG-Orig-Subj: Re: WARNING: at fs/btrfs/free-space-cache.c:921 __btrfs_write_out_cache+0x6b9/0x9a0 [btrfs]() References: <20130430094131.GA8274@carfax.org.uk> <20130430135816.GD2580@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2011-07-01) X-Barracuda-Connect: mail1.int.fusionio.com[10.101.1.21] X-Barracuda-Start-Time: 1367344434 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://10.101.1.180:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at fusionio.com X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: 0.58 X-Barracuda-Spam-Status: No, SCORE=0.58 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MV0249, MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.129625 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words 2.00 BSF_SC0_MV0249 Custom rule MV0249 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Tue, Apr 30, 2013 at 08:33:38AM -0600, Alexander Skwar wrote: > Hello Josef > > On Tue, Apr 30, 2013 at 3:58 PM, Josef Bacik wrote: > > > So we deal with this case fine, but it really shouldn't be happening, it only > > happens if your block groups are way too large, which again shouldn't be > > happening. Can you run fsck on this device and see if it complains? Thanks, > > > a@ewzw032:~$ sudo btrfsck /dev/system/Data > checking extents > checking fs roots > checking root refs > found 115308904448 bytes used err is 0 > total csum bytes: 112056692 > total tree bytes: 521891840 > total fs tree bytes: 353947648 > btree space waste bytes: 122297974 > file data blocks allocated: 114787012608 > referenced 114787000320 > Btrfs v0.20-rc1 > Can you run this patch and capture the output when you get the warning? You should see some mesages before the -- [ cut here ] -- part, make sure to capture those. Thanks, Josef --- 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/free-space-cache.c b/fs/btrfs/free-space-cache.c index ecca6c7..2e8e098 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -921,6 +921,10 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode, /* Make sure we can fit our crcs into the first page */ if (io_ctl.check_crcs && (io_ctl.num_pages * sizeof(u32)) >= PAGE_CACHE_SIZE) { + printk(KERN_ERR "num_pages is %d, blockgroup? %s\n", + io_ctl.num_pages, block_group ? "yes" : "no"); + if (block_group) + printk(KERN_ERR "block group offset=%Lu, size=%Lu\n", block_group->key.objectid, block_group->key.offset); WARN_ON(1); goto out_nospc; }