From patchwork Thu Jan 12 14:00:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513285 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 E227B60762 for ; Thu, 12 Jan 2017 14:02:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0C9D286B9 for ; Thu, 12 Jan 2017 14:02:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5BEC286D5; Thu, 12 Jan 2017 14:02:00 +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 7D014286D9 for ; Thu, 12 Jan 2017 14:01:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751052AbdALOBP (ORCPT ); Thu, 12 Jan 2017 09:01:15 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34208 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbdALOBO (ORCPT ); Thu, 12 Jan 2017 09:01:14 -0500 Received: by mail-wm0-f65.google.com with SMTP id c85so3882470wmi.1 for ; Thu, 12 Jan 2017 06:01:13 -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=k6yL6xzyftNutWum6uak14rUbgjEzQndSCP1Z357RgQ=; b=GeLT99iR1Jyog3y93Z3Z+vC5ScxPHpActtRn+Sg61jfN4vGH1zjZkEDro/g3+JeZtu 8wE3hRrq5R2nKWFJ+juzR3OxGTglQ4o7Tc1raxWeJcS4GaLzlB3d6NPFrRyypKfMXvF5 x7iv8KM0ysaxibEtVG2M8KPLmvIDxizA/LJnByGKDjm2HthcUkrZTTsxaH9Acm6Y7SZS fS22zSOb2QQLuZg35gr38wv7jylBSVLMHMV/PmjPVY+Iib4sMBOXj95OXIKuNfv/Yj9j mvOaQjcFGRuJRN6bRd2fn6Q7Orb8uwOWbTwpSNkoY66Xmyg1AyEa9KYhWOb5RuI0nhQu A1bA== 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=k6yL6xzyftNutWum6uak14rUbgjEzQndSCP1Z357RgQ=; b=FzCHmzRYyQhTA13EFjolP09P2NOdXG7+ovCi/Fqw1/8kBdX8rpugan+m8Cn388aJQf xl9k3T5x08kugyaOCXgesr9VKWa2UrASTOox0pQVxUkbB0R1sD6oPPYzlxBvaEAHG0vo dcRdGN8DBjnh5vQyoHF3HDsKsnSsNB2/6UPsOzhnxiQbK78r703m7Os7Xp0NZdY1a+84 6tb7XVksmmvBByaRLxTHgAnGXWfe6fNlNHL15cUj1P//5rWK+X7mDrk4Zaz3UNnoKNMR KKQNZu0+J4sAlsbOVs9GRkLIA/pzTrb16eJIa6t0cHdUXgQwx/E+M2S0wqiFO9TItMBa ZMVQ== X-Gm-Message-State: AIkVDXKBas5QFYv5nePUVL0uHDJWaWTvKhnZf+D1X8sTyPCgNYixG0gkKbb3/UV1otFtQw== X-Received: by 10.28.230.194 with SMTP id e63mr8662910wmi.25.1484229673050; Thu, 12 Jan 2017 06:01:13 -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.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:12 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 16/24] btrfs: Make log_directory_changes take btrfs_inode Date: Thu, 12 Jan 2017 16:00:42 +0200 Message-Id: <1484229650-24554-17-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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 84c1ab4c8a7f..7a500ff14681 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3449,7 +3449,7 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, * key logged by this transaction. */ static noinline int log_directory_changes(struct btrfs_trans_handle *trans, - struct btrfs_root *root, struct inode *inode, + struct btrfs_root *root, struct btrfs_inode *inode, struct btrfs_path *path, struct btrfs_path *dst_path, struct btrfs_log_ctx *ctx) @@ -3463,9 +3463,8 @@ static noinline int log_directory_changes(struct btrfs_trans_handle *trans, min_key = 0; max_key = 0; while (1) { - ret = log_dir_items(trans, root, BTRFS_I(inode), path, - dst_path, key_type, ctx, min_key, - &max_key); + ret = log_dir_items(trans, root, inode, path, dst_path, key_type, + ctx, min_key, &max_key); if (ret) return ret; if (max_key == (u64)-1) @@ -4970,7 +4969,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, } if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) { - ret = log_directory_changes(trans, root, inode, path, dst_path, + ret = log_directory_changes(trans, root, BTRFS_I(inode), path, dst_path, ctx); if (ret) { err = ret;