From patchwork Tue Jan 17 22:31:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9522023 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 F09136020B for ; Tue, 17 Jan 2017 22:38:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2CA128426 for ; Tue, 17 Jan 2017 22:38:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D79DE28602; Tue, 17 Jan 2017 22:38:56 +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 89A8628426 for ; Tue, 17 Jan 2017 22:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751152AbdAQWiw (ORCPT ); Tue, 17 Jan 2017 17:38:52 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33916 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbdAQWiv (ORCPT ); Tue, 17 Jan 2017 17:38:51 -0500 Received: by mail-wm0-f67.google.com with SMTP id c85so9420481wmi.1 for ; Tue, 17 Jan 2017 14:38:45 -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=pjHQkfGgix2H5dTzpKu/r5d4NL4dibAhrsgnWv96IdI=; b=YX39eTX1Zi0LhkM+YWG8IAxURYfHjrVTJZVuci9J5cDC2c/vgGRtpHpXXJgAfWvB4L ieJGoVCHaqLklb2XcOF5khb5ceN6lcBy1pN2pxkcc71d9nQ1aLWToC/KZp8clvEmFvVp 0ZORnlrHxORc43v6WizORBrAMptaQ9q0kHOnoY+zoWg7ufxfwxwtPQWvQucZibo87L7Q qIZtqOceroo21bQ3xphxrL4ecOaEI5/6T/uO/1pdpnC2fd8p5UJqHpDFwEEjiE8KpkaY H17LC3IczMmcSbW3pIYGeFxIVBmQ2gYi5Rlw3rX+BM4udhHJOU8aKHrbya5I758FIOa4 MN3g== 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=pjHQkfGgix2H5dTzpKu/r5d4NL4dibAhrsgnWv96IdI=; b=PECFznmR8qMaSV2q5xhgr/qnzFvqRKp2s7lixyz6m5ba3GA+ImP/PDq3UXWjR7SP0a fH/kKaJj3MEeH7MqOaQaZDkulgDf6JnNtOaBNGXuKAkUuTytJ8A9YHRzmm9HgxpJZAGs X/hjVd/PmFRMXp2iBjn+3vAMPlrEVzKIMkkDmPfEzu7U60fKytGE0AGoC3FuRerkocbv ptMLsw8fLfBMpT3fN8DcyCbb/7zX7bFiBRa3jIsAz+aNh3ef7ZGzBazG6DPul48tL0t+ igQjanEC9M22y2KV6b2t2fg/1XvozwEeY2cXFliILNLH907vYVc2HKRFT0r+YPAgyqwC oJAg== X-Gm-Message-State: AIkVDXJjCXYhXGYXc1RRVoAPF1QD/GZiAkRiiaJb3x+pUYCDkLjjsJGB7sypFi1PxZSvbw== X-Received: by 10.28.214.137 with SMTP id n131mr312654wmg.120.1484692340990; Tue, 17 Jan 2017 14:32:20 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id w197sm39980489wmd.11.2017.01.17.14.32.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 14:32:20 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.cz Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCHv2 13/24] btrfs: Make btrfs_get_logged_extents take btrfs_inode Date: Wed, 18 Jan 2017 00:31:39 +0200 Message-Id: <1484692310-3987-14-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484692310-3987-1-git-send-email-n.borisov.lkml@gmail.com> References: <20170117161550.GW12081@twin.jikos.cz> <1484692310-3987-1-git-send-email-n.borisov.lkml@gmail.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/ordered-data.c | 4 ++-- fs/btrfs/ordered-data.h | 2 +- fs/btrfs/tree-log.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 041c3326d109..7ae350a64c77 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -432,7 +432,7 @@ int btrfs_dec_test_ordered_pending(struct inode *inode, } /* Needs to either be called under a log transaction or the log_mutex */ -void btrfs_get_logged_extents(struct inode *inode, +void btrfs_get_logged_extents(struct btrfs_inode *inode, struct list_head *logged_list, const loff_t start, const loff_t end) @@ -442,7 +442,7 @@ void btrfs_get_logged_extents(struct inode *inode, struct rb_node *n; struct rb_node *prev; - tree = &BTRFS_I(inode)->ordered_tree; + tree = &inode->ordered_tree; spin_lock_irq(&tree->lock); n = __tree_search(&tree->tree, end, &prev); if (!n) diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h index 5f2b0ca28705..b02b71d41d83 100644 --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h @@ -201,7 +201,7 @@ int btrfs_wait_ordered_extents(struct btrfs_root *root, int nr, const u64 range_start, const u64 range_len); int btrfs_wait_ordered_roots(struct btrfs_fs_info *fs_info, int nr, const u64 range_start, const u64 range_len); -void btrfs_get_logged_extents(struct inode *inode, +void btrfs_get_logged_extents(struct btrfs_inode *inode, struct list_head *logged_list, const loff_t start, const loff_t end); diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 9f2c42016825..0e061f91055e 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4193,7 +4193,7 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans, } list_sort(NULL, &extents, extent_cmp); - btrfs_get_logged_extents(inode, logged_list, start, end); + btrfs_get_logged_extents(BTRFS_I(inode), logged_list, start, end); /* * Some ordered extents started by fsync might have completed * before we could collect them into the list logged_list, which