From patchwork Thu Jan 12 14:00:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513257 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 33FFC60710 for ; Thu, 12 Jan 2017 14:01:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26E4E286B9 for ; Thu, 12 Jan 2017 14:01:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BBC6286D9; Thu, 12 Jan 2017 14:01: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 CCDE6286B9 for ; Thu, 12 Jan 2017 14:01:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751027AbdALOBL (ORCPT ); Thu, 12 Jan 2017 09:01:11 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36211 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbdALOBE (ORCPT ); Thu, 12 Jan 2017 09:01:04 -0500 Received: by mail-wm0-f66.google.com with SMTP id r126so3894550wmr.3 for ; Thu, 12 Jan 2017 06:01:04 -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=litJrsCLwJqj6I+FFmWeF2DmjRc5njZG+F3/RJkJjpM=; b=dNYrae2XueDcdXrx4DqWO1ZuoxJ+I5kIhHTmzxpXfS9NM0RbkvTD8XrKhrWU2YgejP a4n2VsSHdBwnVgiGxBBdTuHGSpw0wRQ/+FHG+Rr5SV4HWdCu9ZNym1xIzxwKy5kUKoFe wksluiBP8y/fSb0VX81qjFsbFzjoNuk1vZl8LhtpJiKTjyTT5yNZpu2c0+OUshZiF4IG AqG7b4NjuJwANL1YlLYE5J/5UHwOc9ea7o+JNdYrsy3TVr104ypvvKeX3I+ccp0bRe5E 8V7mTfNkMbOsF62f7yum+a/quv5q3vWIvEudJqrOy7P1HliHZeS+6G5mB6zR5vxxBwB3 uKwg== 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=litJrsCLwJqj6I+FFmWeF2DmjRc5njZG+F3/RJkJjpM=; b=Vw47u5vSIFElTqRVydWQ9Z1HTRtEDm0kmsHo8pB/Ltd3LY2j0UlnPTz6lpEUeSz5kI WVDJSJ6UuInzD9S4H0L6nC5BGxY1m+t6gRVDQ1v7KgN4MKEzNZNfUo9LvBdLTJvVhXPN xoFaDSs1KThpehMmILWyoiWibjYWln/iqKlZlUxpFIk0WsR7BnBlRGbupkdVQFHlCETo ZJFTFCgi8A6mCpRKcqWyTutHFQqCaN5YCvX3ZAaPgOPllLJwFLnw/1JyYRtJ5ZLrPxgw mclgukRA42/7uQ5yJEPhb6C/ImwWrBVJP+ATTesUutAV3CZZ0EN3meGcqwlHocxShvzR xjNA== X-Gm-Message-State: AIkVDXJ56QMnKcPZ2crLIR9M7/XYOOOt5PArgRQEFEgejkDu3vW72otwCXQU2sLrP8H7xQ== X-Received: by 10.28.105.81 with SMTP id e78mr8971747wmc.140.1484229663184; Thu, 12 Jan 2017 06:01:03 -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.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:02 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 08/24] btrfs: Make logged_inode_size take btrfs_inode Date: Thu, 12 Jan 2017 16:00:34 +0200 Message-Id: <1484229650-24554-9-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/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index ffe9aad04be5..0fc963454c82 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4240,13 +4240,13 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans, return ret; } -static int logged_inode_size(struct btrfs_root *log, struct inode *inode, +static int logged_inode_size(struct btrfs_root *log, struct btrfs_inode *inode, struct btrfs_path *path, u64 *size_ret) { struct btrfs_key key; int ret; - key.objectid = btrfs_ino(BTRFS_I(inode)); + key.objectid = btrfs_ino(inode); key.type = BTRFS_INODE_ITEM_KEY; key.offset = 0; @@ -4692,7 +4692,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, * (zeroes), as if an expanding truncate happened, * instead of getting a file of 4Kb only. */ - err = logged_inode_size(log, inode, path, + err = logged_inode_size(log, BTRFS_I(inode), path, &logged_isize); if (err) goto out_unlock;