From patchwork Thu Jan 12 14:00:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513261 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 EE47960710 for ; Thu, 12 Jan 2017 14:01:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE762286B9 for ; Thu, 12 Jan 2017 14:01:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D35B6286D9; Thu, 12 Jan 2017 14:01:22 +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 6E3D7286B9 for ; Thu, 12 Jan 2017 14:01:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751067AbdALOBT (ORCPT ); Thu, 12 Jan 2017 09:01:19 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36421 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbdALOBL (ORCPT ); Thu, 12 Jan 2017 09:01:11 -0500 Received: by mail-lf0-f65.google.com with SMTP id h65so1925323lfi.3 for ; Thu, 12 Jan 2017 06:01:10 -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=Al8K9nbyZ7bOkCTkgHoZSYgX+OP8dGQcqJz/5FYM+84=; b=THhtMjSChn/q7pqAAsQUH+6clvj3e0ITxbNPIxq15m9xzf1sDSo0QHWT7E+EoZZrkc Y93wgsB6MR9xM44YfbdY0dlw6U5lHJQmmMmkp8TGs77ml1yaCJJ9mFxnPOwS/xkGu+qW fYJT2X6LAz2wVXeF/u+xLREN5gxRS/krpic0h6tiOOiZeELQSQW5tjIb2Sqcz/hMXiYT mmofEgVxEzQysRm6eNq7IkTzIvcwz08ou5XR+/jp8pIH16kNRuL7vFwLO+ehoobivNj+ 8En5pvIaun0cooz2k9lxmZTYxcMdZRkLP95GBFds/eASsa79x7p9UlzNK8fLFm8eDpuI 5cow== 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=Al8K9nbyZ7bOkCTkgHoZSYgX+OP8dGQcqJz/5FYM+84=; b=MbE7ZXn5cbBS3AFEAnqDjTSucnG1e8Y32F3yrPOPNZaxbxAnowXEJDYFe77QuhgdqY DN7fjLSGY6WxyaCXBR2nchOmxHJHqRHEOkguvpIPY2v65C6bPrTI8bxzuWiCsuG1x4dV 51zgTUMIutbGr1MpzjuIBi294MXjFfS37uv9KQefuNivN2NsIIR/eJq6tEri5JIgUNUy GY7uFCkMYANUCk8dqCqtas6VoP+DtazTUY5C4LE8T6kGAiWbOku7q5D4Sxgh1baKmPgz k+5LvdBhbLiMxzzaeT39ewE/54nbj/LDb0/UCVHBX8w9kFdAEhqHWC/w8wfwhbwXrqSS 92IQ== X-Gm-Message-State: AIkVDXJ8lkaeyptkMqjGNFjqKpCdejv+XMPTo6lTviCF5u8nscBd+x1oOQaKUKdV22rSPA== X-Received: by 10.194.46.132 with SMTP id v4mr8374718wjm.98.1484229669363; Thu, 12 Jan 2017 06:01:09 -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.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:08 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 12/24] btrfs: Make btrfs_log_trailing_hole take btrfs_inode Date: Thu, 12 Jan 2017 16:00:38 +0200 Message-Id: <1484229650-24554-13-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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 4d8726aad7b3..98b40e65d880 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4371,7 +4371,7 @@ static int btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, */ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans, struct btrfs_root *root, - struct inode *inode, + struct btrfs_inode *inode, struct btrfs_path *path) { struct btrfs_fs_info *fs_info = root->fs_info; @@ -4381,8 +4381,8 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans, u64 hole_size; struct extent_buffer *leaf; struct btrfs_root *log = root->log_root; - const u64 ino = btrfs_ino(BTRFS_I(inode)); - const u64 i_size = i_size_read(inode); + const u64 ino = btrfs_ino(inode); + const u64 i_size = i_size_read(&inode->vfs_inode); if (!btrfs_fs_incompat(fs_info, NO_HOLES)) return 0; @@ -4918,7 +4918,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, if (max_key.type >= BTRFS_EXTENT_DATA_KEY && !fast_search) { btrfs_release_path(path); btrfs_release_path(dst_path); - err = btrfs_log_trailing_hole(trans, root, inode, path); + err = btrfs_log_trailing_hole(trans, root, BTRFS_I(inode), path); if (err) goto out_unlock; }