From patchwork Thu Jan 12 14:00: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: 9513279 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 946BC60710 for ; Thu, 12 Jan 2017 14:01:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82ACF286B9 for ; Thu, 12 Jan 2017 14:01:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77866286D4; Thu, 12 Jan 2017 14:01:54 +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=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no 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 B84BA286D5 for ; Thu, 12 Jan 2017 14:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751064AbdALOBS (ORCPT ); Thu, 12 Jan 2017 09:01:18 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:32982 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbdALOBL (ORCPT ); Thu, 12 Jan 2017 09:01:11 -0500 Received: by mail-lf0-f67.google.com with SMTP id k62so1945737lfg.0 for ; Thu, 12 Jan 2017 06:01: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=f5vbxl9eIYyTAgIggC3ABJVpi3QoKK2VXKB6d22Zcsc=; b=XRFS6H8ZSqQxkjXZmru6t5KbbSqRhIxIWJkcnE0MT5mnEZop5ND7e2RIXmYWHGbPFe h7tUl//v3x8LJjAZIdB+6meobOdI5mCcysBiWFsEsCBDhYyAY+bD/Uc47W+0QdOLw6xl KP7tENa7DUhu3aXFMykBiT4O06kmrDdwkQbF8l6jzbA6zI1FP2N40icyXh8ENZk6BqOv d+Slqb4T+mnDIJ9G7RMhG0FVjeB1HUZnCLCqgQnLSRkO7LazXXWPj26BXc2diPprf45E ni7ALPMgdNb2/CV2uidPXY/+r3kM02qWLKqZ+ynn1voR+vmhTriWPKmtiHrpt5thBFNR 9Xbw== 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=f5vbxl9eIYyTAgIggC3ABJVpi3QoKK2VXKB6d22Zcsc=; b=KiVZwZ5wmy2PyV8u+tzCZIt6ZWvkm1nCa3dvsYAkcyFNQ0cwOVxD+1MejbjuGk1j2U RMF4Os5hlpFGq8zIbwu/+QqIUZKOmk5vvm01gzNujuDv3HkEAAofvkMsohzKhB4OPHcq cZTev9f0zzytGQAvKIU1y87O/SKli3BiDCHYzdtAtdVon+S3MqYLDTg43aukNq8hiYAC jzBoa/cOoVI4G5TW7pSLmZ8TnQ4Ybfzp/Se4mZ5LxrR0DrQ9WFOUDd5MTpUHfu9kLRcj lcD6bnIQ8AcghR0UOzmGP2p4DZBwQybtLnGX86rNZZuwRwzKdjnk4cXBFO/e/u3c+zA5 hfYg== X-Gm-Message-State: AIkVDXIZipkts8o7/gH1PN4ObxyrVQfeM3tYud2AhQdtLJpDyFBGs42HLG9xI4Vw6R+0CQ== X-Received: by 10.194.136.83 with SMTP id py19mr8584296wjb.2.1484229670237; Thu, 12 Jan 2017 06:01:10 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id y145sm725670wmc.17.2017.01.12.06.01.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:09 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 13/24] btrfs: Make btrfs_get_logged_extents take btrfs_inode Date: Thu, 12 Jan 2017 16:00:39 +0200 Message-Id: <1484229650-24554-14-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484229650-24554-1-git-send-email-n.borisov.lkml@gmail.com> References: <1484229650-24554-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 98b40e65d880..657c118aed63 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4192,7 +4192,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