From patchwork Tue Jan 17 22:31: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: 9522025 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 807B66020B for ; Tue, 17 Jan 2017 22:39:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72AA428426 for ; Tue, 17 Jan 2017 22:39:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6721728602; Tue, 17 Jan 2017 22:39:03 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 1915F28426 for ; Tue, 17 Jan 2017 22:39:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751203AbdAQWjB (ORCPT ); Tue, 17 Jan 2017 17:39:01 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35714 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751139AbdAQWjA (ORCPT ); Tue, 17 Jan 2017 17:39:00 -0500 Received: by mail-wm0-f65.google.com with SMTP id d140so25584638wmd.2 for ; Tue, 17 Jan 2017 14:38:59 -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=JRnPxmotyhypaYUYx34wPUvXoAYcv0VW0c9GDUv7wPM=; b=A0l9Gu9Ikva8bMkcDPYPNXR03rtGpvQmaijqykS6vDve/VFL+FkbkXdFihwYwentag wZhIf44alihQxUIXPo1LxpOhNLJg2J4bQiq1M0KFpKcFmEZ7aRuAyVw6r319BupCC9dU TiFi8qRkcrbi25eKPstSkJG6QjMw1ZpvFb80bYY3gZHfDQTTuPz03JIlQ8zEl7qfy19Y Xm5SE2Cx7gcenKoVWTlby4NR5RpPl68jyS3BCrmEngwuvzk5HQSNmryoqkwqf+okmkvy xraeHsbwy3NxUQUXi0ersQI0WVMezG0Z/R6NMPYNPY44oiuuOcsZn/xHP2mrGlbz7bJQ CJlA== 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=JRnPxmotyhypaYUYx34wPUvXoAYcv0VW0c9GDUv7wPM=; b=K2KO2HRgOU2rOjSVX5CKpGY8kGC7+srSrgcuRNzSouMGIJO1wfP3OvSBCUAt36mWGu Y6YxGMmc6v238di4QI7Pcl9/UraujT7BpOW7uCTeajbSyQr2inSCGUo/ARKPKzJmYtEf 6SbRN/rcYln0vozFb2oOnXp/G/no8ArbXpDiUPjRrP+ZfbZIVPHXpEwdoRLAvVROuF1M scJC1KivA3V4hYEfHxCzmU+CMYZmI8vAiD3gluWCWtwJb8PjXkXP46DcjeHnvQH4H0bU lkZkBZti9KBLPhPTmPim8KJMRGD0jlsZluqfzPNV4ApKDetqqS+J+twGJCrtAyOkjo1A 6+Cg== X-Gm-Message-State: AIkVDXJy5gadjYrX9d79OoMJsGPXgcIAo5+2xb15o8UqkePicy8hVSrMxtG1T0SI6sxguQ== X-Received: by 10.28.156.151 with SMTP id f145mr387430wme.8.1484692339607; Tue, 17 Jan 2017 14:32:19 -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.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 14:32:19 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.cz Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCHv2 12/24] btrfs: Make btrfs_log_trailing_hole take btrfs_inode Date: Wed, 18 Jan 2017 00:31:38 +0200 Message-Id: <1484692310-3987-13-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/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 1301c517c2f0..9f2c42016825 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4372,7 +4372,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; @@ -4382,8 +4382,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; @@ -4925,7 +4925,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; }