From patchwork Wed Oct 1 14:11:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 5012011 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 E1B79BEEA6 for ; Wed, 1 Oct 2014 14:11:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E0872020F for ; Wed, 1 Oct 2014 14:11:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 402242020E for ; Wed, 1 Oct 2014 14:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751337AbaJAOLO (ORCPT ); Wed, 1 Oct 2014 10:11:14 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:28210 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbaJAOLN (ORCPT ); Wed, 1 Oct 2014 10:11:13 -0400 Received: from pps.filterd (m0044010 [127.0.0.1]) by mx0a-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id s91EA2DY004460 for ; Wed, 1 Oct 2014 07:11:13 -0700 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=onlf0cBu54ab00s31lQUZ+PsYNMa35dapNA6r+x/jLk=; b=OAdXhjr1UrvMw95KQeoI2H/kBfidLO2ED+Xc6dTcJkvd43QxW/Gdx6tKzDwVNacQPz6k T8pszPy28ZY3fPPoT6MFiG9I9zezNEw4nj0QhU/TIgaCrrVUN1DLQDHVtl5Z5cr7/zmY e+g78tOnPX8diw4G2RTpFfaHP1qF600yqpI= Received: from mail.thefacebook.com (mailwest.thefacebook.com [173.252.71.148]) by mx0a-00082601.pphosted.com with ESMTP id 1pr09uj166-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK) for ; Wed, 01 Oct 2014 07:11:12 -0700 Received: from localhost (192.168.57.29) by mail.thefacebook.com (192.168.16.14) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 1 Oct 2014 07:11:11 -0700 From: Josef Bacik To: Subject: [PATCH] Btrfs-progs: make free space cache less noisy Date: Wed, 1 Oct 2014 10:11:09 -0400 Message-ID: <1412172669-1975-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-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.28, 0.0.0000 definitions=2014-10-01_06:2014-10-01, 2014-10-01, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 spamscore=0 suspectscore=3 phishscore=0 adultscore=1 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1410010143 X-FB-Internal: deliver 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,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 Fsck only cares if the cache is really broken, so don't be noisy if the generations don't match or other such errors. Thanks, Signed-off-by: Josef Bacik --- free-space-cache.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/free-space-cache.c b/free-space-cache.c index 2440dd8..43c0894 100644 --- a/free-space-cache.c +++ b/free-space-cache.c @@ -174,9 +174,6 @@ static int io_ctl_check_generation(struct io_ctl *io_ctl, u64 generation) gen = io_ctl->cur; if (le64_to_cpu(*gen) != generation) { - printk("btrfs: space cache generation " - "(%Lu) does not match inode (%Lu)\n", *gen, - generation); io_ctl_unmap_page(io_ctl); return -EIO; } @@ -318,11 +315,6 @@ static int __load_free_space_cache(struct btrfs_root *root, } if (btrfs_inode_generation(leaf, inode_item) != generation) { - printf("free space inode generation (%llu) did not match " - "free space cache generation (%llu)\n", - (unsigned long long)btrfs_inode_generation(leaf, - inode_item), - (unsigned long long)generation); btrfs_release_path(path); return 0; } @@ -434,13 +426,9 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, block_group->key.objectid); btrfs_free_path(path); - if (ret < 0) { + if (ret < 0) ret = 0; - printf("failed to load free space cache for block group %llu\n", - block_group->key.objectid); - } - return ret; }