From patchwork Fri Feb 17 14:43:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9579975 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 524EA600F6 for ; Fri, 17 Feb 2017 14:44:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42543286F5 for ; Fri, 17 Feb 2017 14:44:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 373AA286F7; Fri, 17 Feb 2017 14:44:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC71B286F5 for ; Fri, 17 Feb 2017 14:44:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934343AbdBQOoO (ORCPT ); Fri, 17 Feb 2017 09:44:14 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33438 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934382AbdBQOoM (ORCPT ); Fri, 17 Feb 2017 09:44:12 -0500 Received: by mail-wm0-f68.google.com with SMTP id v77so2937149wmv.0 for ; Fri, 17 Feb 2017 06:44:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jVb5WzV+a8bPtCmRqED2wpzZ10E8Ivo4/TgVOB861J0=; b=Sb3MPmYiQktqUBiISSrZTGfvOQLSvyqX8HCQ7sImWYmnyVEjrMYtcXtqfenVg8RTE3 +36pwsiSYfMmukTVMP/AFEFEdrCucH/WQXVicSvTfT4wUBnKhMpv2/OxyMBJ6XA2HPVe FVa/LBMiRvcuOxET25ELWQBVZaZLlOPw7Z56czQY7YPaB1aJJMz97f7/O5FsCGXSfpH5 bdJOyr+nKIIcTUKk3k6MOuFkF32RW1FVDeRo2Rua1+jvCCwO6nuuzs2aKkaegbA7vl4I T+pJrocMdZqgcQ0hvOM26syDJYeG4ooBGGpXlpA853pxZN1cAY+gypA+VCum2FbMkpg8 dqLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jVb5WzV+a8bPtCmRqED2wpzZ10E8Ivo4/TgVOB861J0=; b=olroKKRSZpeyjR/VN7Y/Us8eMx5fUQJC4UB0SbJUgAnYvFja8jpDTrsomXDGbqpym9 5alMJiDDcwsMz8pEvz9of1Jq1c0Dv/5S6lprcckJeFeY4ibEcYwujuGohIL9Q8Xop7W8 rZbX0bdlSadXWW6ugPTBjO22D3bCY0JCfYBg66DqA/N1klZpGaMuwxBG58VSNa5bJiph 7jEYvcKYz2katQY+b/eSq9w9+0zdrB6Ql7VWewjBsaG7NupnhIxDBWJHEyIl4TMtg6Pm bvpomHJlFttVJXhfQ3ErsWN7pztUb8hgCrOlHYZ8WYEfPH75Lx+fFR9HDjeFfbYDrLs3 IdgA== X-Gm-Message-State: AMke39kL6TOmP+2oK5OOfcZnIXfzPrbzZnmBVkYslo++3QpNO+HK2yGXmlXVe+prnsuyWQ== X-Received: by 10.28.147.72 with SMTP id v69mr2364344wmd.51.1487342651035; Fri, 17 Feb 2017 06:44:11 -0800 (PST) Received: from fisk.suse.de (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id y126sm1932713wmg.19.2017.02.17.06.44.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Feb 2017 06:44:10 -0800 (PST) From: Nikolay Borisov X-Google-Original-From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 24/38] btrfs: make btrfs_print_data_csum_error take btrfs_inode Date: Fri, 17 Feb 2017 16:43:15 +0200 Message-Id: <1487342609-20652-25-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487342609-20652-1-git-send-email-nborisov@suse.com> References: <1487342609-20652-1-git-send-email-nborisov@suse.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nikolay Borisov --- fs/btrfs/btrfs_inode.h | 8 ++++---- fs/btrfs/compression.c | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 36eca5464e1b..c10d21b2f0df 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -324,21 +324,21 @@ static inline void btrfs_inode_resume_unlocked_dio(struct inode *inode) &BTRFS_I(inode)->runtime_flags); } -static inline void btrfs_print_data_csum_error(struct inode *inode, +static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode, u64 logical_start, u32 csum, u32 csum_expected, int mirror_num) { - struct btrfs_root *root = BTRFS_I(inode)->root; + struct btrfs_root *root = inode->root; /* Output minus objectid, which is more meaningful */ if (root->objectid >= BTRFS_LAST_FREE_OBJECTID) btrfs_warn_rl(root->fs_info, "csum failed root %lld ino %lld off %llu csum 0x%08x expected csum 0x%08x mirror %d", - root->objectid, btrfs_ino(BTRFS_I(inode)), + root->objectid, btrfs_ino(inode), logical_start, csum, csum_expected, mirror_num); else btrfs_warn_rl(root->fs_info, "csum failed root %llu ino %llu off %llu csum 0x%08x expected csum 0x%08x mirror %d", - root->objectid, btrfs_ino(BTRFS_I(inode)), + root->objectid, btrfs_ino(inode), logical_start, csum, csum_expected, mirror_num); } diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 903c32c9eb22..b8de71abfbd3 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -124,7 +124,7 @@ static int check_compressed_csum(struct inode *inode, kunmap_atomic(kaddr); if (csum != *cb_sum) { - btrfs_print_data_csum_error(inode, disk_start, csum, + btrfs_print_data_csum_error(BTRFS_I(inode), disk_start, csum, *cb_sum, cb->mirror_num); ret = -EIO; goto fail; diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8c22820b6b0a..f71296933aec 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3034,7 +3034,7 @@ static int __readpage_endio_check(struct inode *inode, kunmap_atomic(kaddr); return 0; zeroit: - btrfs_print_data_csum_error(inode, start, csum, csum_expected, + btrfs_print_data_csum_error(BTRFS_I(inode), start, csum, csum_expected, io_bio->mirror_num); memset(kaddr + pgoff, 1, len); flush_dcache_page(page);