From patchwork Fri Feb 17 14:43:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9579987 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 A8C1F600F6 for ; Fri, 17 Feb 2017 14:44:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 988BB286F3 for ; Fri, 17 Feb 2017 14:44:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CBF3286F7; Fri, 17 Feb 2017 14:44:34 +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 3973A286F3 for ; Fri, 17 Feb 2017 14:44:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934129AbdBQOoc (ORCPT ); Fri, 17 Feb 2017 09:44:32 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35420 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934564AbdBQOoZ (ORCPT ); Fri, 17 Feb 2017 09:44:25 -0500 Received: by mail-wm0-f66.google.com with SMTP id u63so2926928wmu.2 for ; Fri, 17 Feb 2017 06:44:25 -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=k4lQc9fsvrhXnFJlwraLwezcVPUozbQwhIK4TbR9WnY=; b=jwnvZyqvtScgIS8WctulZGBj3S8Zu7lxV5yOuhRmn4AiqQmsWSeiKCIXCtQun0qvkH U/Z+3yy9LqCA+2LGumY4SVDAbMxROQDjWaZ2hvzSNB5SwMtOK+ZJGIZCOW8Q5K0gI2Ph ieACSZPua+nyJD01zgrja5wH9LGpVO6pPZxeZJ40Ae8PF2+4X5Lan7CDAQ42jUr6aNvZ OsEDQZDNNiuFkWniozr3SN0RJQfVfSZkrMn+uBnx4/RHuHdM4BjlqrW5oaDzwY7apy08 XFGYa5Li1HJIv7MvfFgdQg1oKFQ/KPiO0EAIKQLJ0UZTm178nqej7mWLsP1v7xcBn2g+ 3y2Q== 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=k4lQc9fsvrhXnFJlwraLwezcVPUozbQwhIK4TbR9WnY=; b=HiKcKQpdIhWwPqmyQMGQIePYsvi6vTaRwOTFy+EZcnKz1YqiFfIIT0LHozYLNL39FT BFnG/0pBkuREb8t9kur3uvVFVU6YDAXddrtRqfjNMcYc5/dJtvqjDwI6IlZj91kfpdgX y1OCyElEdm4tNiAV6wK07RtDyVvsb1Ii6fx+Td83cUg8w+cmz0/sNSL+6hV/xq9GwX81 RKk9Dd25N43lWk9q18CH1Qs234y1LATn05Qs93xhfGLpQQ0dOPX4xOA7wYqWjrzHa4mw cYcNfAFlZWZK5Pt3as9h15SEucoG8TkPfciOr4KPLdtO/mOw29VkhETb7IUkuLxk32B6 EbYg== X-Gm-Message-State: AMke39kCpRqLlUxblgZLnvQR0A9AwJz5UMbd3hGa5iGVYfo71ilOgtBjfMMB1Hd2Nn1YLg== X-Received: by 10.28.174.14 with SMTP id x14mr3882865wme.75.1487342654571; Fri, 17 Feb 2017 06:44:14 -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.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Feb 2017 06:44:14 -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 28/38] btrfs: make btrfs_free_io_failure_record take btrfs_inode Date: Fri, 17 Feb 2017 16:43:19 +0200 Message-Id: <1487342609-20652-29-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/extent_io.c | 4 ++-- fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 16860ab7cb5e..aecc3d87255e 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2151,9 +2151,9 @@ int clean_io_failure(struct btrfs_inode *inode, u64 start, struct page *page, * - under ordered extent * - the inode is freeing */ -void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end) +void btrfs_free_io_failure_record(struct btrfs_inode *inode, u64 start, u64 end) { - struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; + struct extent_io_tree *failure_tree = &inode->io_failure_tree; struct io_failure_record *failrec; struct extent_state *state, *next; diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 81c9f678ada5..a6150f1be662 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -482,7 +482,7 @@ struct io_failure_record { }; -void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end); +void btrfs_free_io_failure_record(struct btrfs_inode *inode, u64 start, u64 end); int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end, struct io_failure_record **failrec_ret); int btrfs_check_repairable(struct inode *inode, struct bio *failed_bio, diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a472d13a9ecb..52387c033e3f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2806,7 +2806,7 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) goto out; } - btrfs_free_io_failure_record(inode, ordered_extent->file_offset, + btrfs_free_io_failure_record(BTRFS_I(inode), ordered_extent->file_offset, ordered_extent->file_offset + ordered_extent->len - 1); @@ -5190,7 +5190,7 @@ void btrfs_evict_inode(struct inode *inode) if (!special_file(inode->i_mode)) btrfs_wait_ordered_range(inode, 0, (u64)-1); - btrfs_free_io_failure_record(inode, 0, (u64)-1); + btrfs_free_io_failure_record(BTRFS_I(inode), 0, (u64)-1); if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags)) { BUG_ON(test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,