From patchwork Mon Jan 20 08:41:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 3511111 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A0B329F1C3 for ; Mon, 20 Jan 2014 08:42:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09BC52015A for ; Mon, 20 Jan 2014 08:42:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A09820148 for ; Mon, 20 Jan 2014 08:42:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752804AbaATImo (ORCPT ); Mon, 20 Jan 2014 03:42:44 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:42801 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752128AbaATImn (ORCPT ); Mon, 20 Jan 2014 03:42:43 -0500 X-IronPort-AV: E=Sophos;i="4.95,689,1384272000"; d="scan'208,223";a="9435692" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 20 Jan 2014 16:39:01 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s0K8gfRQ008502; Mon, 20 Jan 2014 16:42:41 +0800 Received: from [10.167.226.104] ([10.167.226.104]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2014012016412069-1212002 ; Mon, 20 Jan 2014 16:41:20 +0800 Message-ID: <52DCE13D.9000303@cn.fujitsu.com> Date: Mon, 20 Jan 2014 16:41:33 +0800 From: Wang Shilong User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130612 Thunderbird/17.0.6 MIME-Version: 1.0 To: Tomasz Chmielewski CC: Shilong Wang , "linux-btrfs@vger.kernel.org" Subject: Re: WARNING at fs/btrfs/backref.c:936 find_parent_nodes+0x378/0x5d2 References: <20140119140913.501c73e8@virtall.com> <20140119224654.4e600232@virtall.com> In-Reply-To: <20140119224654.4e600232@virtall.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2014/01/20 16:41:20, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2014/01/20 16:41:21, Serialize complete at 2014/01/20 16:41:21 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello Tomasz, On 01/20/2014 05:46 AM, Tomasz Chmielewski wrote: > No balance was running. The usual rsync and btrfs snapshots; I'm unable > to say when exactly it happened (i.e. if it was during rsync or snapshot > adding/removal). > > As of defragment - I didn't run it manually, but I have autodefrag > option enabled: Would you please try attached patch and see if problem happen again.:-) Thanks, Wang > > /dev/sdc1 on /mnt/lxc2 type btrfs > (rw,noatime,compress-force=zlib,space_cache,autodefrag) > > From a97bab00f5351182962655901b8fb045ae7cf5ac Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Mon, 20 Jan 2014 15:17:45 +0800 Subject: [PATCH] Btrfs: release path after adding missing keys Signed-off-by: Wang Shilong --- fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index d059cc8..b0ce27a 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -931,13 +931,13 @@ again: goto out; } } - btrfs_release_path(path); list_splice_init(&prefs_delayed, &prefs); ret = __add_missing_keys(fs_info, &prefs); if (ret) goto out; + btrfs_release_path(path); __merge_refs(&prefs, 1); -- 1.8.3.1