From patchwork Tue Jan 7 20:34:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 3449851 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B4C79C02DC for ; Tue, 7 Jan 2014 20:34:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF80D200F4 for ; Tue, 7 Jan 2014 20:34:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F0706200F3 for ; Tue, 7 Jan 2014 20:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753523AbaAGUem (ORCPT ); Tue, 7 Jan 2014 15:34:42 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:22195 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753251AbaAGUel (ORCPT ); Tue, 7 Jan 2014 15:34:41 -0500 Received: from pps.filterd (m0044008 [127.0.0.1]) by mx0a-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id s07KVqGa021145 for ; Tue, 7 Jan 2014 12:34:40 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : mime-version : content-type; s=facebook; bh=pVxq0ed0rvN4r2WddovyBZF4X4LhVl+hreZXHtOzN/o=; b=jweD9NTgZdOQmX/Rt3LOAeS/xR23klRHFu6EB9FdgGv8sW667KoRDvEgCwLp6FBF/Q8j Qw/Usl2b8DH2QcRg2qic6xvd2TeLeGOzy9m7sup2dId60d1rxou5qyTT+kOy8rKcPIas qNxszRH/oLChqJ3n4wfAMzjswaZoqSgfh/8= Received: from mail.thefacebook.com (prn1-cmdf-dc01-fw1-nat.corp.tfbnw.net [173.252.71.129] (may be forged)) by mx0a-00082601.pphosted.com with ESMTP id 1h80sf5k4w-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK) for ; Tue, 07 Jan 2014 12:34:40 -0800 Received: from localhost (192.168.57.29) by mail.thefacebook.com (192.168.16.21) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 7 Jan 2014 12:34:23 -0800 From: Josef Bacik To: Subject: [PATCH] Btrfs-progs: bail if we find errors in the extent tree Date: Tue, 7 Jan 2014 15:34:21 -0500 Message-ID: <1389126861-31257-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [192.168.57.29] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87, 1.0.14, 0.0.0000 definitions=2014-01-07_07:2014-01-07, 2014-01-07, 1970-01-01 signatures=0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 For some reason we weren't exiting if there were errors in the extent tree, which means we could have errors in just the extent tree and things like xfstests would keep going because we completely throw away the return value. Thanks, Signed-off-by: Josef Bacik --- cmds-check.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmds-check.c b/cmds-check.c index 689fe6c..cbabfdc 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -6409,8 +6409,10 @@ int cmd_check(int argc, char **argv) goto out; } ret = check_chunks_and_extents(root); - if (ret) + if (ret) { fprintf(stderr, "Errors found in extent allocation tree or chunk allocation\n"); + goto out; + } fprintf(stderr, "checking free space cache\n"); ret = check_space_cache(root);